首页 > Windows开发 > 详细

glibc库函数,系统调用API

时间:2018-07-26 20:37:16      阅读:271      评论:0      收藏:0      [点我收藏+]

技术分享图片

     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;

 

glibc库函数,系统调用API

原文:https://www.cnblogs.com/blog-yejy/p/9373850.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!