Official mbed Real Time Operating System based on the RTX implementation of the CMSIS-RTOS API open standard.

Dependents:   Assignment_3__Embedded_Software

Fork of mbed-rtos by mbed official

Committer:
mbed_official
Date:
Mon Jun 01 11:00:36 2015 +0100
Revision:
80:2dab120a94c2
Synchronized with git revision 7a1d25e3dfbe5bc1457774d4af3c73383a0ff81d

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

Silicon Labs - Initial test framework pin definitions for EFM32 platforms

Who changed what in which revision?

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