http://blog.chinaunix.net/uid/16979052.html
全部博文(286)
发布时间:2012-07-02 10:22:46
#include volatile uint32_t timer_ticks = 0;int timer_intr(int intr_no, void *arg, struct pt_regs *regs){ timer_ticks++; return 0;}static void settimer(int hz){ /*设置定时器多长时间发送一个中断给cpu*/ uint32_t divisor = 1193180/hz; /*二进制.........【阅读全文】
发布时间:2012-07-02 10:21:42
#include #include #include struct thread_t SECTION(".task0") ALIGN(PAGE_SIZE) task0; struct thread_t *current = &task0;static struct list_t *ptask_list = &(task0.link);volatile int switch_enable=0;void task_add(struct thread_t *tsk){ list_ins.........【阅读全文】