6 typedef unsigned char U8;
8 typedef unsigned short U16;
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);
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 */
33 /* Hardware dependant part: specific for CM processor */
34 U8 stack_frame; /* Stack frame: 0=Basic, 1=Extended */
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 */
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];
47 /* Task entry point used for uVision debugger */
48 FUNCP ptask; /* Task entry address */