glibc库函数,系统调用API

     glibc封装了大部分系统API,我们一般都是使用glibc封装的接口进行系统调用,碰到一些没有封装的接口,可以通过这个

函数syscall 进行系统调用。

 
 1 /* Invoke `system call' number SYSNO, passing it the remaining arguments.
 2    This is completely system-dependent, and not often useful.
 3 
 4    In Unix, `syscall' sets `errno' for all errors and most calls return -1
 5    for errors; in many systems you cannot pass arguments or get return
 6    values for all system calls (`pipe', `fork', and `getppid' typically
 7    among them).
 8 
 9    In Mach, all system calls take normal arguments and always return an
10    error code (zero for success).  */
11 extern long int syscall (long int __sysno, ...) __THROW;

 

相关文章:

  • 2021-09-22
  • 2022-12-23
  • 2022-12-23
  • 2021-08-09
  • 2021-11-05
  • 2021-07-11
猜你喜欢
  • 2021-12-05
  • 2021-06-08
  • 2022-12-23
  • 2021-04-05
  • 2021-05-21
  • 2021-12-31
  • 2022-01-17
相关资源
相似解决方案