
驱动开发
文章平均质量分 72
Bin Watson
这个作者很懒,什么都没留下…
展开
-
Linux驱动开发学习笔记(三)中断处理(系统)
三个名词: 中断处理程序(interrupt handle) 中断服务例程(interrupt service routine,ISR) 设备驱动程序(driver) 一个中断处理程序,一般分为两部分,上部分(top half)和下(底)半部(bottom half)。 为什么要这么分呢? 当一个中断触发请求后,中断处理程序会被调用,内核为了防止re-entrance(重入)问题,会禁止所有处理器(all processors)中对应中断线(IRQ line)——相当于屏蔽中断。而且在中断上原创 2022-05-07 10:07:54 · 1072 阅读 · 0 评论 -
Linux驱动开发学习笔记(二)异步通知
应用层程序 #include <sys/types.h> #include <sys/stat.h> #include <fcntl.h> #include <stdio.h> #include <signal.h> #include <sys/types.h> #include <unistd.h> #include <fcntl.h> int fd; void my_signal_fun(int signu原创 2022-05-01 09:49:18 · 311 阅读 · 0 评论 -
Linux驱动开发学习笔记(一)被动等待poll的使用
当应用层调用了poll之后,会调用Linux下层的sys_poll函数(位于fs/select.c) asmlinkage long sys_poll(struct pollfd __user *ufds, unsigned int nfds, long timeout_msecs) { s64 timeout_jiffies; if (timeout_msecs > 0) { #if HZ > 1000 /* We can only overflow if HZ > 10原创 2022-04-28 23:37:57 · 1066 阅读 · 0 评论