]> git.gir.st - tmk_keyboard.git/blob - tmk_core/tool/mbed/mbed-sdk/libraries/rtos/rtx/TARGET_CORTEX_M/os_tcb.h
Merge commit '5a0132f1c1c9a14fd2941f0a5e29bbf5e31da20c' into master-core-pull
[tmk_keyboard.git] / tmk_core / tool / mbed / mbed-sdk / libraries / rtos / rtx / TARGET_CORTEX_M / os_tcb.h
1 #ifndef OS_TCB_H
2 #define OS_TCB_H
3
4 /* Types */
5 typedef char S8;
6 typedef unsigned char U8;
7 typedef short S16;
8 typedef unsigned short U16;
9 typedef int S32;
10 typedef unsigned int U32;
11 typedef long long S64;
12 typedef unsigned long long U64;
13 typedef unsigned char BIT;
14 typedef unsigned int BOOL;
15 typedef void (*FUNCP)(void);
16
17 typedef struct OS_TCB {
18 /* General part: identical for all implementations. */
19 U8 cb_type; /* Control Block Type */
20 U8 state; /* Task state */
21 U8 prio; /* Execution priority */
22 U8 task_id; /* Task ID value for optimized TCB access */
23 struct OS_TCB *p_lnk; /* Link pointer for ready/sem. wait list */
24 struct OS_TCB *p_rlnk; /* Link pointer for sem./mbx lst backwards */
25 struct OS_TCB *p_dlnk; /* Link pointer for delay list */
26 struct OS_TCB *p_blnk; /* Link pointer for delay list backwards */
27 U16 delta_time; /* Time until time out */
28 U16 interval_time; /* Time interval for periodic waits */
29 U16 events; /* Event flags */
30 U16 waits; /* Wait flags */
31 void **msg; /* Direct message passing when task waits */
32
33 /* Hardware dependant part: specific for CM processor */
34 U8 stack_frame; /* Stack frame: 0=Basic, 1=Extended */
35 U8 reserved1;
36 U16 reserved2;
37 U32 priv_stack; /* Private stack size in bytes */
38 U32 tsk_stack; /* Current task Stack pointer (R13) */
39 U32 *stack; /* Pointer to Task Stack memory block */
40
41 /* Library dependant part */
42 #if defined (__CC_ARM) && !defined (__MICROLIB)
43 /* A memory space for arm standard library. */
44 U32 std_libspace[96/4];
45 #endif
46
47 /* Task entry point used for uVision debugger */
48 FUNCP ptask; /* Task entry address */
49 } *P_TCB;
50
51 #endif
Imprint / Impressum