- 博客(3)
- 收藏
- 关注
原创 在Linux内核创建一个简单的testTask任务
在Linux内核创建一个简单的testTask任务,2秒输出一次打印。 #define TEST_TASK_NAME "testTask" //task name #define TASK_PRINT_STR "task test" //print int test_cnt = 0; //print counter static int test_task_thread(void *dat
2018-02-05 16:46:14 1056
原创 timer and ko
内核定时器的实现,依赖时钟滴答中断来实现, 实时性比较好 init_timer(); //初始 timer_list 的结构的一些变量 add_timer() //将timer 加入内核timer列表中,等待处理 timer_k.c #include #include #include #include #include int count = 0; char *st
2018-02-05 16:30:10 148
原创 最简单的编译
***单个文件编译*** 编译hello.c文件 hello.c #include int main (void) { printf("hello world\n"); return 0; } 直接在命令行编译:分步编译: #生成hello.o $ gcc -c hello.c #生成可执行文件hello $ gcc -o hello hello.o
2018-02-02 16:09:49 162
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人