Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
mbed-rtos/rtx/TARGET_ARM7/os_tcb.h@3:3bc2882232a6, 2021-04-15 (annotated)
- Committer:
- qmaker
- Date:
- Thu Apr 15 08:43:24 2021 +0000
- Revision:
- 3:3bc2882232a6
- Parent:
- 0:0d257bbf5c05
en cours de dev
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
qmaker | 0:0d257bbf5c05 | 1 | #ifndef OS_TCB_H |
qmaker | 0:0d257bbf5c05 | 2 | #define OS_TCB_H |
qmaker | 0:0d257bbf5c05 | 3 | |
qmaker | 0:0d257bbf5c05 | 4 | /* Types */ |
qmaker | 0:0d257bbf5c05 | 5 | typedef char S8; |
qmaker | 0:0d257bbf5c05 | 6 | typedef unsigned char U8; |
qmaker | 0:0d257bbf5c05 | 7 | typedef short S16; |
qmaker | 0:0d257bbf5c05 | 8 | typedef unsigned short U16; |
qmaker | 0:0d257bbf5c05 | 9 | typedef int S32; |
qmaker | 0:0d257bbf5c05 | 10 | typedef unsigned int U32; |
qmaker | 0:0d257bbf5c05 | 11 | typedef long long S64; |
qmaker | 0:0d257bbf5c05 | 12 | typedef unsigned long long U64; |
qmaker | 0:0d257bbf5c05 | 13 | typedef unsigned char BIT; |
qmaker | 0:0d257bbf5c05 | 14 | typedef unsigned int BOOL; |
qmaker | 0:0d257bbf5c05 | 15 | typedef void (*FUNCP)(void); |
qmaker | 0:0d257bbf5c05 | 16 | #define TCB_STACK_LR_OFFSET_BYTES (14*4) // prelast DWORD |
qmaker | 0:0d257bbf5c05 | 17 | #define TCB_STACK_LR_OFFSET_DWORDS (14) // prelast DWORD |
qmaker | 0:0d257bbf5c05 | 18 | #define TCB_STACK_R0_OFFSET_BYTES (1*4) // second DWORD |
qmaker | 0:0d257bbf5c05 | 19 | #define TCB_STACK_R0_OFFSET_DWORDS (1) // second DWORD |
qmaker | 0:0d257bbf5c05 | 20 | |
qmaker | 0:0d257bbf5c05 | 21 | typedef struct OS_TCB { |
qmaker | 0:0d257bbf5c05 | 22 | /* General part: identical for all implementations. */ |
qmaker | 0:0d257bbf5c05 | 23 | U8 cb_type; /* Control Block Type */ |
qmaker | 0:0d257bbf5c05 | 24 | U8 state; /* Task state */ |
qmaker | 0:0d257bbf5c05 | 25 | U8 prio; /* Execution priority */ |
qmaker | 0:0d257bbf5c05 | 26 | U8 task_id; /* Task ID value for optimized TCB access */ |
qmaker | 0:0d257bbf5c05 | 27 | struct OS_TCB *p_lnk; /* Link pointer for ready/sem. wait list */ |
qmaker | 0:0d257bbf5c05 | 28 | struct OS_TCB *p_rlnk; /* Link pointer for sem./mbx lst backwards */ |
qmaker | 0:0d257bbf5c05 | 29 | struct OS_TCB *p_dlnk; /* Link pointer for delay list */ |
qmaker | 0:0d257bbf5c05 | 30 | struct OS_TCB *p_blnk; /* Link pointer for delay list backwards */ |
qmaker | 0:0d257bbf5c05 | 31 | U16 delta_time; /* Time until time out */ |
qmaker | 0:0d257bbf5c05 | 32 | U16 interval_time; /* Time interval for periodic waits */ |
qmaker | 0:0d257bbf5c05 | 33 | U16 events; /* Event flags */ |
qmaker | 0:0d257bbf5c05 | 34 | U16 waits; /* Wait flags */ |
qmaker | 0:0d257bbf5c05 | 35 | void **msg; /* Direct message passing when task waits */ |
qmaker | 0:0d257bbf5c05 | 36 | |
qmaker | 0:0d257bbf5c05 | 37 | /* Hardware dependant part: specific for CM processor */ |
qmaker | 0:0d257bbf5c05 | 38 | U8 stack_frame; /* Stack frame: 0=Basic, 1=Extended */ |
qmaker | 0:0d257bbf5c05 | 39 | U8 reserved1; |
qmaker | 0:0d257bbf5c05 | 40 | U16 reserved2; |
qmaker | 0:0d257bbf5c05 | 41 | U32 priv_stack; /* Private stack size in bytes */ |
qmaker | 0:0d257bbf5c05 | 42 | U32 tsk_stack; /* Current task Stack pointer (R13) */ |
qmaker | 0:0d257bbf5c05 | 43 | U32 *stack; /* Pointer to Task Stack memory block */ |
qmaker | 0:0d257bbf5c05 | 44 | |
qmaker | 0:0d257bbf5c05 | 45 | /* Library dependant part */ |
qmaker | 0:0d257bbf5c05 | 46 | #if defined (__CC_ARM) && !defined (__MICROLIB) |
qmaker | 0:0d257bbf5c05 | 47 | /* A memory space for arm standard library. */ |
qmaker | 0:0d257bbf5c05 | 48 | U32 std_libspace[96/4]; |
qmaker | 0:0d257bbf5c05 | 49 | #endif |
qmaker | 0:0d257bbf5c05 | 50 | |
qmaker | 0:0d257bbf5c05 | 51 | /* Task entry point used for uVision debugger */ |
qmaker | 0:0d257bbf5c05 | 52 | FUNCP ptask; /* Task entry address */ |
qmaker | 0:0d257bbf5c05 | 53 | } *P_TCB; |
qmaker | 0:0d257bbf5c05 | 54 | |
qmaker | 0:0d257bbf5c05 | 55 | #endif |