易截截图软件、单文件、免安装、纯绿色、仅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操作时,需要超时机制保证任务不处于无休止的等待状态;在延时处理时,可以通过“闹表”进行相对准点的唤醒操作。在多任务操作系统中,定时器是一种非常常用的资源。
对于熟悉硬件 ......

GTK 代码从Linux移植到Windows心得

调试代码的难度是首次编写这些代码的两倍,因此,如果你在编写代码时就已经发挥了全部的聪
明才智,那么按照常理,你将无法凭借自己的智慧去调试这些代码。


......

LINUX SSH乱码解决


vi /etc/sysconfig/i18n
将内容改为
LANG="zh_CN.GB18030"
LANGUAGE="zh_CN.GB18030:zh_CN.GB2312:zh_CN"
SUPPORTED="zh_CN.GB18030:zh_CN:zh:en_US.UTF-8:en_US:en"
SYSFONT="lat0-sun16"
这样中文在SSH,telnet终端就可以正常显示了。
......

构建ARM Linux交叉编译工具链

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

linux 下的超级终端minicom

虚拟机下linux下可以用使用主机的串口(虚拟机添加硬件里面可选)
linux下的超级终端minicom
进入超级终端的命令
[root]#minicom -s
选择串口一项
需要设定串口ttyS0(你的串口的设备名)
波特率115200
硬件流控关闭(默认是开启,如果开启的话,不能用键盘输入)
软件流控关闭
Save setup as dfl
exit
OK,这就可 ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号