📄 task.h
字号:
/************ tasK.h *******************************************************
This file is created by Peng.Wang 06/20/2006
Multitasking routine
***************************************************************************/
#ifndef TASK_H
#define TASK_H
#include<type.h>
/***************************************************************************
The task data structure
***************************************************************************/
typedef void (*TASKENTRY)(void);
typedef struct
{
Int8 Name[16];
Int16 Priority;
Int16 * Stack_top;
Int32 Stack_size;
TASKENTRY Task_entry;
}Tcb;
/*for the only one mcu system ,we can realize the mutex by switch on /off interrupt*/
#define M_ENTER_CRITICAL() asm CLI /*turn off the interrupt*/
#define M_EXIT_CRITICAL() asm STI /* turn on the interrupt*/
extern void T_main(void);
extern Tcb* T_get_ready_task(void);
#endif /*TASK_H*/
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -