摘要: 写一个模块测试proc文件的读写: 1 #include linux/module.h 2 #include linux/kernel.h 3 #include linux/proc_fs.h 4 #include linux/sched.h 5 #include asm/uaccess.h 6 7 阅读全文
posted @ 2016-12-04 19:51 soul.stone 阅读(213) 评论(0) 推荐(0) 编辑
摘要: #include <unistd.h>int execl(const char *path, const char *arg, ...);int execlp(const char *file, const char *arg, ...);int execle(const char *path, c 阅读全文
posted @ 2016-12-04 17:10 soul.stone 阅读(446) 评论(0) 推荐(0) 编辑
摘要: 1、jiffies HZ=100,jiffies=1 means 10ms。 2,延时 unsigned long timeout = jiffies + (3*HZ); while (hwgroup->busy) { if (time_after(jiffies, timeout)) { retu 阅读全文
posted @ 2016-12-04 16:19 soul.stone 阅读(605) 评论(0) 推荐(0) 编辑
摘要: 1、启动 1)程序的运行参数。 set args //指定运行时参数。(如:set args 10 20 30 ) show args //查看设置好的运行参数。 2)运行环境 path //设定程序的运行路径。 show paths //查看程序的运行路径。 set environment var 阅读全文
posted @ 2016-12-04 16:18 soul.stone 阅读(213) 评论(0) 推荐(0) 编辑
摘要: 1,进程绑定 #include <sched.h> cpu_set_t set;void CPU_ZERO(cpu_set_t *set);void CPU_SET(int cpu, cpu_set_t *set);void CPU_CLR(int cpu, cpu_set_t *set);int 阅读全文
posted @ 2016-12-04 14:01 soul.stone 阅读(415) 评论(0) 推荐(0) 编辑