open怎么在unistd.h头文件中找不到对应的__NR_open系统调用号?
时间:2011-01-27
来源:互联网
今天下了个2.6.37内核,本来向看看open()函数在设备驱动使用中要经过那么途径最终调用struct file_operation结构体里的.open 函数的。但是,我在这个2.6.37内核工程里没有找到
open(const char* filename,int flags,mode_t mode)
而且在unistd.h也找不到__NR_open系统调用号
open(const char* filename,int flags,mode_t mode)
而且在unistd.h也找不到__NR_open系统调用号
作者: shaohui973 发布时间: 2011-01-27
参考一下这个帖子:
http://linux.chinaunix.net/bbs/thread-1177485-1-1.html
高版本的定义方式发生了变化
http://linux.chinaunix.net/bbs/thread-1177485-1-1.html
高版本的定义方式发生了变化
作者: Godbach 发布时间: 2011-01-28
我在2.6.36里面的 include/asm-generic/unistd.h 看到:
662 #define __NR_open 1024
663 __SYSCALL(__NR_open, sys_open)
难道37的没有?
662 #define __NR_open 1024
663 __SYSCALL(__NR_open, sys_open)
难道37的没有?
作者: amarant 发布时间: 2011-01-28
2.6.37 中的
不过这个定义是在条件宏 #ifdef __ARCH_WANT_SYSCALL_NO_AT 成立的条件下
QUOTE:
653 /*
654 * All syscalls below here should go away really,
655 * these are provided for both review and as a porting
656 * help for the C library version.
657 *
658 * Last chance: are any of these important enough to
659 * enable by default?
660 */
661 #ifdef __ARCH_WANT_SYSCALL_NO_AT
662 #define __NR_open 1024
663 __SYSCALL(__NR_open, sys_open)
664 #define __NR_link 1025
665 __SYSCALL(__NR_link, sys_link)
654 * All syscalls below here should go away really,
655 * these are provided for both review and as a porting
656 * help for the C library version.
657 *
658 * Last chance: are any of these important enough to
659 * enable by default?
660 */
661 #ifdef __ARCH_WANT_SYSCALL_NO_AT
662 #define __NR_open 1024
663 __SYSCALL(__NR_open, sys_open)
664 #define __NR_link 1025
665 __SYSCALL(__NR_link, sys_link)
不过这个定义是在条件宏 #ifdef __ARCH_WANT_SYSCALL_NO_AT 成立的条件下
作者: Godbach 发布时间: 2011-01-28
相关阅读 更多
热门阅读
-
office 2019专业增强版最新2021版激活秘钥/序列号/激活码推荐 附激活工具
阅读:74
-
如何安装mysql8.0
阅读:31
-
Word快速设置标题样式步骤详解
阅读:28
-
20+道必知必会的Vue面试题(附答案解析)
阅读:37
-
HTML如何制作表单
阅读:22
-
百词斩可以改天数吗?当然可以,4个步骤轻松修改天数!
阅读:31
-
ET文件格式和XLS格式文件之间如何转化?
阅读:24
-
react和vue的区别及优缺点是什么
阅读:121
-
支付宝人脸识别如何关闭?
阅读:21
-
腾讯微云怎么修改照片或视频备份路径?
阅读:28