码迷,mamicode.com
首页 > 其他好文 > 详细

Implement a System Call in Kernel 3.10.56 (X86_64)

时间:2014-10-10 07:04:24      阅读:218      评论:0      收藏:0      [点我收藏+]

标签:io   ar   for   strong   sp   on   cti   amp   linux   

Implementing a system call in Kernel 2.6.32 is somehow different from

the method in Kernel 3.10.56.

In kernel 2.6.32, we should register the system call number in the file

/arch/x86/include/asm/unistd_64.h and then add the corresponding function

prototype of system call in the file /include/linux/syscalls.h.

But in kernel 3.10.56, we just need modify one file /arch/x86/syscalls/syscall_64.tbl,

for example, we want to add a system call Print_Info in kernel 3.10.56, adding the entry

314    common   Print_Info  sys_Print_Info 

at here, 314 represents the system call number, common means we can use this system

call under 32 bit architecture and 64 bit architecture. The last two items have the same

meaning as in kernel 2.6.32.

under the system call entry 313 is ok. Also you should implement this system call in the

appropriate souce file. 

Implement a System Call in Kernel 3.10.56 (X86_64)

标签:io   ar   for   strong   sp   on   cti   amp   linux   

原文地址:http://www.cnblogs.com/miaoyong/p/4014889.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!