mbed-rtos // fixed error.h

Dependents:   USBHost

Fork of mbed-rtos by mbed official

Committer:
emilmont
Date:
Fri Nov 23 09:57:31 2012 +0000
Revision:
6:350b53afb889
Child:
31:015df9e602b6
Merge RTOS C++ API and RTX under the same library; Update RTX to version 4.60; Add proper Thread destructor;

Who changed what in which revision?

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