加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 综合聚焦 > 服务器 > Linux > 正文

在linux中没有超过6个参数的系统调用是真的吗?

发布时间:2020-12-14 00:03:41 所属栏目:Linux 来源:网络整理
导读:在unistd.h中有_syscall0~_syscall6: _syscall6(type,name,type1,arg1,type2,arg2,type3,arg3,type4,arg4,type5,arg5,type6,arg6) 我的结论是对还是不对? 解决方法 看起来该功能接受7个参数(0-6),但这个网页说6 从这里:http://www.win.tue.nl/~aeb/linux/
在unistd.h中有_syscall0~_syscall6:

_syscall6(type,name,type1,arg1,type2,arg2,type3,arg3,type4,arg4,type5,arg5,type6,arg6)

我的结论是对还是不对?

解决方法

看起来该功能接受7个参数(0-6),但这个网页说6

从这里:http://www.win.tue.nl/~aeb/linux/lk/lk-4.html

Earlier versions of Linux could handle only four or five system call parameters,and therefore the system calls select() (5 parameters) and mmap() (6 parameters) used to have a single parameter that was a pointer to a parameter block in memory. Since Linux 1.3.0 five parameters are supported (and the earlier select with memory block was renamed old_select),and since Linux 2.3.31 six parameters are supported (and the earlier mmap with memory block was succeeded by the new mmap2).

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读