![](https://img-blog.csdnimg.cn/20201014180756926.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
c语言学习
夜半207
开开心心每一天吧
展开
-
c语言学习——在一个字符串中查找另个字符串字符
c和指针的一个6.1习题:在字符串str中字符,查找在字符串source中位置并打印出来。 #include <stdio.h> #include <stdlib.h> #ifndef NULL #define NULL 0 #endif char *find_char ( char const *source, char const *chare) { c...原创 2018-12-16 23:50:16 · 2513 阅读 · 0 评论 -
linux 驱动中定时器timer学习
linux中定时器,比较简单。 struct timer_list { struct list_head list; //linux中对所有定时器实行链表管理,此为链表头结点 unsigned long expires; //定时器到期时间 unsigned long data; //此参数最后传入定时处理函数,类似于线程...原创 2019-05-19 12:10:04 · 370 阅读 · 0 评论 -
kernel ioctl操作
ioctl 有的需要参数,有的不需要参数。 比如: #define INIT_DEV _IO('g', 0) #define RESET_DEV _IOW('g', 1, int) #define READ_DEV _IOR('g', 2, int) int fd = open('/dev/g_dev', O_RDWR); (1) ioctl(fd, INIT_DEV); (2) ...原创 2019-06-19 11:00:26 · 514 阅读 · 0 评论