in OS_TSK, rename run as tsk_run and new as tsk_new.

Committer:
jonathonfletcher
Date:
Sun Sep 02 03:24:20 2012 +0000
Revision:
0:5f46ebd8588e
in OS_TSK, rename run as tsk_run and new as tsk_new.

Who changed what in which revision?

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