摘要: 本文转载自:http://blog.chinaunix.net/uid-30058258-id-5029847.html printf是一个行缓冲函数printf函数是标准函数,最终会调用到系统调用函数,printf函数会掉用到write系统函数;但是调用write函数需要满足一些条件件。(1)缓冲 阅读全文
posted @ 2017-04-13 11:50 请给我倒杯茶 阅读(2465) 评论(0) 推荐(0) 编辑
摘要: 1、申请设备号 int register_chrdev_region(dev_t from, unsigned count, const char *name) 指定从设备号from开始,申请count个设备号,在/proc/devices中的名字为name。返回值:成功返回0,失败返回错误码。 2 阅读全文
posted @ 2017-04-13 11:43 请给我倒杯茶 阅读(336) 评论(0) 推荐(0) 编辑