02 2017 档案

摘要:/** *此实例涉及到线程的挂起与竞态,字符IO的堵塞与非堵塞 */struct scull_pipe { wait_queue_head_t inp, outp; char *buffer, *end; char *rp, wp; //i... 阅读全文
posted @ 2017-02-28 19:26 gluo-dreamer 阅读(163) 评论(0) 推荐(0)
摘要:C语言中 typeof 关键字是用来定义变量数据类型的。在linux内核源代码中广泛使用。下面是Linux内核源代码中一个关于typeof实例:#define min(x, y) ({ \ typeof(x) _min1 = (x)... 阅读全文
posted @ 2017-02-27 12:56 gluo-dreamer 阅读(1482) 评论(0) 推荐(1)