?? hello_func.c
字號(hào):
/* * Written by Der Herr Hofrat, der.herr@hofr.at * (C) 2002 FSMLabs * License: GPL Version 2 */#include <rtl.h>#include <time.h>#include <pthread.h>#include "hello.h"extern struct shared_mem_struct* shared_mem;voidcleanup(void *arg){ printk("Cleanup handler called\n");}void * start_routine(void *arg){ struct sched_param p; p . sched_priority = 1; pthread_setschedparam (pthread_self(), SCHED_FIFO, &p); pthread_make_periodic_np (pthread_self(), gethrtime(), 500000000); pthread_cleanup_push(cleanup,0); while (1) { hrtime_t now; pthread_wait_np (); now = gethrtime(); rtl_printf("I'm here; my shared mem=%d\n", shared_mem->some_int); } pthread_cleanup_pop(0); return 0;}
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -