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

Linux Kernel API (2.6)

#protect share data
spin_lock/spin_unlock: protect the data during process context(and only at process context), and make sure your code bewteen lock/unlock is fast enough.There may deadlock if the same spin_lock is called at interrupt context.
spin_lock_irq/spin_unlock_irq: call it during interrupt context, make sure the irq is on before calling this function, it will disable irq before accessing share data
spin_lock_irqsave/irqrestore: use at interrupt context, and will save/restort irq registers
The code between spin_lock**/spin_unlock** must not sleep.
The spin_lock** API is defined at include/linux/spinlock_api_up.h for UP architecture.
linux/kernel/spinlock.c is only for SMP.
mutex_lock/mutex_unlock: the similar with down/up, but more efficient
mutex_lock_interruptible: the simlilar with down_interruptiable, can be interruptiable by signal.(like CTRL-C)
the code beween mutex_lock and mutex_unlock can go to sleep


相关文档:

Linux内核修炼之道 之 前言

至此落笔之际,恰至Linux问世18周年,18年的成长,如梦似幻,风雨颇多,感慨颇多。
犹自忆起多年以前一位前辈训导时的箴言:今天的必然正是由之前一系列的偶然所决定的。过去的某年某月,我偶然初识Linux就身陷其中,至今仍找不到出去的路,而正是这次乃至之后的多次偶然相联合,从而决定了今日的我要在此写下这些话。那么 ......

linux下pwd命令


在linux下,估计你经常使用pwd这个命令,这个命令就是打印当前的工作路径,即print working directroy, 今天我们也来c语言实现这个命令。
要实现这个功能,需要用到下面的一个系统调用:
#include <unistd.h>
 
char *getcwd(char *buf, size_t size);
该系统调用返回当前的工作目录的绝对路径,绝对路径 ......

linux 站点2

2。 技术网点:
csdn.net
chinaunix.net
ibm.com/developerworks/cn/linux
Linux内存使用详解:
http://blog.chinaunix.net/u2/67750/showart_2154542.html
3。 Linux技术点
系统管理命令(expect.)
shell编程
正则表达式
busybox
文件系统
4。 其它技术点
pclint(静态代码检查工具)
source monitor ......

linux实验三

实验3 Linux的进程控制
一.实验目的
通过实验掌握Linux中进程控制的基本命令。
二.实验要求
1.练习使用who, w, ps,pstree察看系统用户及进程的信息。
2.练习使用kill命令撤销进程。
3.练习进程前后台的切换。
三、         实验报告要求
1.      ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号