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
相关文档:
假如上传代码到SVN上,最简单的一种方法就是:进入代码目录,然后$svn import -m "New import" myqwcode http://192.168.0.222/svn/myqwcode就可以了,不需要建立新目录!
1、将文件checkout到本地目录
svn checkout path(path是服务器上的目录)
例如:svn checkout svn://192.168.1.1/pro/domain
  ......
Linux文件名的长度限制是255个字符
windows下完全限定文件名必须少于260个字符,目录名必须小于248个字符。
linux下文件数、目录数、文件名长度的各种限制
以下测试都是在没有优化或修改内核的前提下测试的结果
1. 测试目的:ext3文件系统下filename最大字符长度
测试平台:RHEL5U3_x64
测试过程:
L ......
由于在开发A1200上的流媒体播放器,免不了长期播放视频,进行稳定性测试。开始是通过GPRS拨号上网,但播放视频太费流量了,充个50元,都顶不住一天的测试。看到window mobile的手机都可以通过PC上网,因此想到moto linux手机也可以共享PC上网,节省流量费用。从理论上将是可行的,因为moto手机可以开启USB LAN,通过USB连接 ......
热心点评:硬盘安装fedora的规则就像我们非常亚克西的政策一样, 告诉你不能发送yellow短信, 但就是不告诉你yellow的尺度是什么, 你只能冒着手机停机的危险,测试下哪些短信究竟射黄了。 通过不下两位数的重启, 摸索了一点点规则。 OK, 我想Linux不是gov, 安装还是有规则可言的,只是我们还没有找到这个readme? 达 ......
inux的chmod命令使用详解
使用方式 : chmod [-cfvR] [--help] [--version] mode file...
说明 : Linux/Unix 的档案存取权限分为三级 : 档案拥有者、群组、其他。利用 chmod 可以藉以控制档案如何被他人所存取。
mode : 权限设定字串 ......