
C语言
文章平均质量分 75
caixingcheng
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
inotify -- Linux 2.6 内核中的文件系统变化通知机制
一、 引言 众所周知,Linux 桌面系统与 MAC 或 Windows 相比有许多不如人意的地方,为了改善这种状况,开源社区提出用户态需要内核提供一些机制,以便用户态能够及时地得知内核或底层硬件设备发生了什么,从而能够更好地管理设备,给用户提供更好的服务,如 hotplug、udev 和 inotify 就是这种需求催生的。Hotplug 是一种内核向用户态应用通报关于热插拔设备一些事件发转载 2012-02-06 10:47:58 · 272 阅读 · 0 评论 -
GNU C __attribute__ 用法
GNU C的一大特色(却不被初学者所知)就是__attribute__机制。__attribute__可以设置函数属性(Function Attribute)、变量属性(Variable Attribute)和类型属性(Type Attribute)。 __attribute__书写特征是:__attribute__前后都有两个下划线,并切后面会紧跟一对原括弧,括弧里面是相应的__att转载 2012-01-05 21:00:14 · 1114 阅读 · 0 评论 -
参数处理函数getopt
#include extern char *optarg; //选项的参数指针 extern int optind, //下一次调用getopt的时,从optind存储的位置处重新开始检查选项。 extern int opterr, //当opterr=0时,getopt不向stderr输出错误信息。 extern int转载 2012-01-05 20:57:26 · 336 阅读 · 0 评论 -
struct timeval 和 struct timespec
timeval DESCRIPTION The functions gettimeofday and settimeofday can get and set the time as well as a timezone. The tv argument is a timeval struct, as specified in : struct ti转载 2012-02-27 17:48:22 · 472 阅读 · 0 评论