`

【Linux 驱动】第七章 时间 延迟及延缓操作 (例子详解二)

 
阅读更多

本文所涉及实验为博文http://blog.csdn.net/tianshuai11/article/details/7465587中示例,请先阅读上述博文,然后消化以下例子

一,模块方法

jiq.c


Makefile

测试:

root@ubuntu:~/桌面/jiq#make

root@ubuntu:~/桌面/jiq# insmod jiq.ko
root@ubuntu:~/桌面/jiq# lsmod //查看安装成功

root@ubuntu:~/桌面/jiq# cat /proc/jiqwq
time delta preempt pid cpu command
6292513 0 0 235 2 kworker/2:1
6292513 0 0 235 2 kworker/2:1
6292513 0 0 235 2 kworker/2:1
6292513 0 0 235 2 kworker/2:1
6292513 0 0 235 2 kworker/2:1
6292513 0 0 235 2 kworker/2:1
6292513 0 0 235 2 kworker/2:1
6292513 0 0 235 2 kworker/2:1
6292513 0 0 235 2 kworker/2:1
6292513 0 0 235 2 kworker/2:1
6292513 0 0 235 2 kworker/2:1

root@ubuntu:~/桌面/jiq# cat /proc/jiqwqdelay
time delta preempt pid cpu command
6297985 1 0 235 2 kworker/2:1
6297986 1 0 235 2 kworker/2:1
6297987 1 0 235 2 kworker/2:1
6297988 1 0 235 2 kworker/2:1
6297989 1 0 235 2 kworker/2:1
6297990 1 0 235 2 kworker/2:1
6297991 1 0 235 2 kworker/2:1
6297992 1 0 235 2 kworker/2:1
6297993 1 0 235 2 kworker/2:1
6297994 1 0 235 2 kworker/2:1
6297995 1 0 235 2 kworker/2:1

root@ubuntu:~/桌面/jiq# cat /proc/jiqtimer
time delta preempt pid cpu command
6304215 0 0 5019 2 cat
6304465 250 256 0 2 kworker/0:1

root@ubuntu:~/桌面/jiq# cat /proc/jiqtasklet
time delta preempt pid cpu command
6323656 0 256 3 0 ksoftirqd/0
6323656 0 256 3 0 ksoftirqd/0
6323656 0 256 3 0 ksoftirqd/0
6323656 0 256 3 0 ksoftirqd/0
6323656 0 256 3 0 ksoftirqd/0
6323656 0 256 3 0 ksoftirqd/0
6323656 0 256 3 0 ksoftirqd/0
6323656 0 256 3 0 ksoftirqd/0
6323656 0 256 3 0 ksoftirqd/0
6323656 0 256 3 0 ksoftirqd/0
6323656 0 256 3 0 ksoftirqd/0







分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics