Counter

Dependencies:   EthernetInterface NTPClient SDFileSystem TextLCD WebSocketClient mbed-rtos mbed Socket lwip-eth lwip-sys lwip FATFileSystem

Committer:
Tuxitheone
Date:
Mon Feb 29 18:59:15 2016 +0000
Revision:
0:ecaf3e593122
TankCounter

Who changed what in which revision?

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