aboutsummaryrefslogtreecommitdiff
path: root/libraries/mbed/rtos/rtx/TARGET_CORTEX_M/os_tcb.h
diff options
context:
space:
mode:
authorPaul Selkirk <paul@psgd.org>2016-04-14 18:50:38 -0400
committerPaul Selkirk <paul@psgd.org>2016-04-14 18:50:38 -0400
commit4a38cf6f44d1c013cbe794093ea6c5b50337431a (patch)
tree148201449b481794ff839cd15d335f40e0f91c9d /libraries/mbed/rtos/rtx/TARGET_CORTEX_M/os_tcb.h
parent79b1ba7104dba52dbfacf11a07305702889f440b (diff)
import mbed rtos library
Diffstat (limited to 'libraries/mbed/rtos/rtx/TARGET_CORTEX_M/os_tcb.h')
-rw-r--r--libraries/mbed/rtos/rtx/TARGET_CORTEX_M/os_tcb.h51
1 files changed, 51 insertions, 0 deletions
diff --git a/libraries/mbed/rtos/rtx/TARGET_CORTEX_M/os_tcb.h b/libraries/mbed/rtos/rtx/TARGET_CORTEX_M/os_tcb.h
new file mode 100644
index 0000000..800f7f5
--- /dev/null
+++ b/libraries/mbed/rtos/rtx/TARGET_CORTEX_M/os_tcb.h
@@ -0,0 +1,51 @@
+#ifndef OS_TCB_H
+#define OS_TCB_H
+
+/* Types */
+typedef char S8;
+typedef unsigned char U8;
+typedef short S16;
+typedef unsigned short U16;
+typedef int S32;
+typedef unsigned int U32;
+typedef long long S64;
+typedef unsigned long long U64;
+typedef unsigned char BIT;
+typedef unsigned int BOOL;
+typedef void (*FUNCP)(void);
+
+typedef struct OS_TCB {
+ /* General part: identical for all implementations. */
+ U8 cb_type; /* Control Block Type */
+ U8 state; /* Task state */
+ U8 prio; /* Execution priority */
+ U8 task_id; /* Task ID value for optimized TCB access */
+ struct OS_TCB *p_lnk; /* Link pointer for ready/sem. wait list */
+ struct OS_TCB *p_rlnk; /* Link pointer for sem./mbx lst backwards */
+ struct OS_TCB *p_dlnk; /* Link pointer for delay list */
+ struct OS_TCB *p_blnk; /* Link pointer for delay list backwards */
+ U16 delta_time; /* Time until time out */
+ U16 interval_time; /* Time interval for periodic waits */
+ U16 events; /* Event flags */
+ U16 waits; /* Wait flags */
+ void **msg; /* Direct message passing when task waits */
+
+ /* Hardware dependant part: specific for CM processor */
+ U8 stack_frame; /* Stack frame: 0=Basic, 1=Extended */
+ U8 reserved1;
+ U16 reserved2;
+ U32 priv_stack; /* Private stack size in bytes */
+ U32 tsk_stack; /* Current task Stack pointer (R13) */
+ U32 *stack; /* Pointer to Task Stack memory block */
+
+ /* Library dependant part */
+#if defined (__CC_ARM) && !defined (__MICROLIB)
+ /* A memory space for arm standard library. */
+ U32 std_libspace[96/4];
+#endif
+
+ /* Task entry point used for uVision debugger */
+ FUNCP ptask; /* Task entry address */
+} *P_TCB;
+
+#endif