易截截图软件、单文件、免安装、纯绿色、仅160KB

linux内核中开头带有 asmlinkage 的函数表示什么

强制通过堆栈传递参数,不要用寄存器传递
仔细看一下有asmlinkage的地方通常是系统调用的函数,因为在系统调用中,寄存器从用户空间传过来后SAVE_ALL压入堆栈,接着调用相应的系统调用函数,这样系统调用函数一定要保证是通过堆栈传递参数的
转贴一段:
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.


相关文档:

[转]Linux中定时器的算法实现

Linux中定时器的算法实现
定时器的作用
       定时器在操作系统中起到了举足轻重的作用。在做IO操作时,需要超时机制保证任务不处于无休止的等待状态;在延时处理时,可以通过“闹表”进行相对准点的唤醒操作。在多任务操作系统中,定时器是一种非常常用的资源。
对于熟悉硬件 ......

Linux内核入门(四)—— 内核汇编语言规则

    任何一个用高级语言编写的操作系统,其内核源代码中总有少部分代码是用汇编语言编写的。读
过Unix Sys V源代码的读者都知道,在其约3万行的核心代码中用汇编语言编写的代码约2000行,分
成不到20个扩展名为.s和.m的文件,其中大部分是关于中断与异常处理的底层程序,还有就是与初始
化有关的程 ......

Linux下的C编程实战之文件系统编程

文章来源:http://dev.yesky.com/468/7601968.shtml
2007-10-12 11:01作者:宋宝华出处:天极网软件频道责任编辑:方舟
1.Linux文件系统
  Linux支持多种文件系统,如ext、ext2、minix、iso9660、msdos、fat、vfat、nfs等。在这些具体文件系统的上层,Linux提供了虚拟文件系统(VFS)来统一它们的行为,虚拟文件系统为 ......

构建ARM Linux交叉编译工具链

2.2  构建ARM Linux交叉编译工具链
构建交叉编译器的第一个步骤就是确定目标平台。在GNU系统中,每个目标平台都有一个明确的格式,这些信息用于在构建过程中识别要使用的不同工具的正确版本。因此,当在一个特定目标机下运行GCC时,GCC便在目录路径中查找包含该目标规范的应用程序路径。GNU的目标规范格式为CPU-PLATF ......

Linux桌面何处去?






<!--
@page { margin: 2cm }
P { margin-bottom: 0.21cm }
-->
    当前,一个很明显的事实是,
Linux
桌面并不普及。原因何在?


XP
盗版海洋中,普及
Linux
,谈何容易?十几年了,说尽
XP
盗版的坏话也无用(不灵验)。
Linux
国产化也失败了。问题究竟 ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号