liberdeng
驱动牛犊
驱动牛犊
  • 注册日期2002-03-11
  • 最后登录2016-01-09
  • 粉丝0
  • 关注0
  • 积分0分
  • 威望0点
  • 贡献值0点
  • 好评度0点
  • 原创分0分
  • 专家分0分
阅读:1571回复:3

请问,在核态asmlinkage 到底是什么意思?

楼主#
更多 发布于:2002-06-22 13:52
请问,在核态asmlinkage 到底是什么意思?
liberdeng
mark_gu
驱动牛犊
驱动牛犊
  • 注册日期2002-06-27
  • 最后登录2005-09-15
  • 粉丝0
  • 关注0
  • 积分1分
  • 威望1点
  • 贡献值0点
  • 好评度0点
  • 原创分0分
  • 专家分0分
沙发#
发布于:2002-06-27 10:06
    所谓asmlinkage是声明在函数之前,表示该函数可以被汇编代码调用。
  :P
mark_gu
驱动牛犊
驱动牛犊
  • 注册日期2002-06-27
  • 最后登录2005-09-15
  • 粉丝0
  • 关注0
  • 积分1分
  • 威望1点
  • 贡献值0点
  • 好评度0点
  • 原创分0分
  • 专家分0分
板凳#
发布于:2002-06-27 10:07
兄弟,快点给分吧,谢了
pengyc
驱动牛犊
驱动牛犊
  • 注册日期2001-07-16
  • 最后登录2010-04-11
  • 粉丝0
  • 关注0
  • 积分0分
  • 威望0点
  • 贡献值0点
  • 好评度0点
  • 原创分0分
  • 专家分0分
地板#
发布于:2002-07-01 12:53
今天看到这么一段话:
The asmlinkage tag is one other thing that we should observe about this simple function. This is a #define for some gcc magic that tells the compiler that the function should not expect to find any of its arguments in registers (a common optimization), but only on the CPU\'s stack. Recall our earlier assertion that system_call consumes its first argument, the system call number, and allows up to four more arguments that are passed along to the real system call. system_call achieves this feat simply by leaving its other arguments (which were passed to it in registers) on the stack. All system calls are marked with the asmlinkage tag, so they all look to the stack for arguments. Of course, in sys_ni_syscall\'s case, this doesn\'t make any difference, because sys_ni_syscall doesn\'t take any arguments, but it\'s an issue for most other system calls. And, because you\'ll be seeing asmlinkage in front of many other functions, I thought you should know what it was about.
不知道是否和mark_gu所说的\"表示该函数可以被汇编代码调用\"有关系?
游客

返回顶部