45 #include "os_typedef.h"
50 #include "os_assert.h"
66 #define N_TOTAL_SEMAPHORES ( N_SEMAPHORES + N_QUEUES )
70 #define N_TOTAL_EVENTS ( N_EVENTS + N_QUEUES )
79 #define OS_BEGIN uint16_t os_task_state = os_task_internal_state_get(running_tid); switch ( os_task_state ) { case 0:
81 #define OS_END os_task_kill(running_tid);\
82 running_tid = NO_TID;\
86 #define OS_SCHEDULE(ofs) os_task_internal_state_set(running_tid, __LINE__+ofs);\
87 running_tid = NO_TID;\
94 #define OS_WAIT_TICKS(x,y) do {\
95 os_task_wait_time_set( running_tid, y, x );\
101 extern uint8_t running_tid;
102 extern uint8_t last_running_task;
103 extern uint8_t running;
105 uint8_t os_running(
void );
110 void os_run_until_taskState(uint8_t taskId, TaskState_t state);
111 TaskState_t os_get_task_state(uint8_t taskId);
112 uint8_t os_get_running_tid(
void);