med rtos libraries

Dependents:   ECE4333Lab3

Fork of mbed-rtos by mbed official

Committer:
mbed_official
Date:
Thu Nov 06 13:00:11 2014 +0000
Revision:
49:77c8e4604045
Child:
59:28712e303960
Synchronized with git revision 7b90c2ba137baaf9769219e0e8a7b8e8d1299c4f

Full URL: https://github.com/mbedmicro/mbed/commit/7b90c2ba137baaf9769219e0e8a7b8e8d1299c4f/

This target is not yet tested, so it can't be released as part of the official
SDK build for now.

Who changed what in which revision?

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