schedule.h

来自「mega128平台下」· C头文件 代码 · 共 49 行

H
49
字号
#ifndef	_SCHEDULE_H
#define	_SCHEDULE_H


unsigned char atomic_start(void);


void atomic_end(unsigned char );


/* These are provided in HPL.td */
void TOSH_wait(void);


void TOSH_sleep(void);

void sched_init(void);


/*
 * TOS_post (thread_pointer)
 *  
 * Put the task pointer into the next free slot.
 * Return 1 if successful, 0 if there is no free slot.
 *
 * This function uses a critical section to protect TOSH_sched_free.
 * As tasks can be posted in both interrupt and non-interrupt context,
 * this is necessary.
 */
char post(void (*tp) ()) ;

/*
 * TOSH_schedule_task()
 *
 * Remove the task at the head of the queue and execute it, freeing
 * the queue entry. Return 1 if a task was executed, 0 if the queue
 * is empty.
 */

int TOSH_run_next_task (void);

void run_task(void);



void __nesc_enable_interrupt(void) ;

#endif

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?