易截截图软件、单文件、免安装、纯绿色、仅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下配置Apache,Subversion和Trac

    最近需要配置svn服务器。在网上找了一下,选择Apache,Subversion和Trac。
    首先准备系统光盘。因为是Linux操作系统,所以准备好系统能节省一些时间,比如python-devel。但是httpd,subversion和trac还是下载源码编译吧。
    下载软件包:
    Gen ......

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系统安装之二: 硬盘安装Fedora 9

热心点评:硬盘安装fedora的规则就像我们非常亚克西的政策一样, 告诉你不能发送yellow短信, 但就是不告诉你yellow的尺度是什么, 你只能冒着手机停机的危险,测试下哪些短信究竟射黄了。 通过不下两位数的重启, 摸索了一点点规则。 OK, 我想Linux不是gov, 安装还是有规则可言的,只是我们还没有找到这个readme?  达 ......

Linux 新增系统调用的启示

最近在研究 Linux 内核的时间子系统,为下一篇长文《服务器程序中的日期与时间》做准备,无意中注意到了 Linux 新增的几个系统调用的对编写服务器代码的影响,先大致记录在这里。这篇博客也可算作前一篇《多线程服务器的常用编程模型》的一个注脚。 1. 服务器程序的风格可能在变 新的创建文件描述符的 syscall 一般都支持 ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号