51 lines
663 B
C
51 lines
663 B
C
#ifndef GLOBAL_H__
|
|
#define GLOBAL_H__
|
|
|
|
#include "main_inc.h"
|
|
|
|
|
|
#define CALL_BACK_ENTER() void *__r9=global_in()
|
|
#define CALL_BACK_EXIT() global_out(__r9)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#define APP_TYPE_SEIZE 0x00000001
|
|
#define APP_TYPE_THREAD 0x00000002
|
|
#define APP_TYPE_HOLD 0x00000003
|
|
|
|
|
|
#define APP_INFO(name_,type_,size_,pro_) \
|
|
const app_info_struct __app_info __attribute__((used,section(".__app_info"))) = \
|
|
{\
|
|
.name=name_,\
|
|
.exe_type=type_,\
|
|
.stack_size=size_,\
|
|
.priority=pro_\
|
|
}
|
|
|
|
|
|
void global_init(app_struct *me);
|
|
|
|
void *global_in(void);
|
|
|
|
void global_out(void *r9);
|
|
|
|
//appÕýÔÚÔËÐÐ
|
|
void global_run_start(void);
|
|
|
|
//app½áÊøÔËÐÐ
|
|
void global_run_exit(void);
|
|
|
|
|
|
|
|
#endif
|
|
|