diff options
author | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2011-04-07 01:54:59 +0000 |
---|---|---|
committer | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2011-04-07 01:54:59 +0000 |
commit | 0a143e4c2dfae5e5b9e1000fd83ce5d05a84d6aa (patch) | |
tree | 655d2b930b49f60fb64154d8be99e45612987f15 /nuttx/include | |
parent | 20ff4c56d20fe8c22d6ac44c02efd1252b32ade6 (diff) | |
download | px4-nuttx-0a143e4c2dfae5e5b9e1000fd83ce5d05a84d6aa.tar.gz px4-nuttx-0a143e4c2dfae5e5b9e1000fd83ce5d05a84d6aa.tar.bz2 px4-nuttx-0a143e4c2dfae5e5b9e1000fd83ce5d05a84d6aa.zip |
Fix AVR build, Add hooks for kernel threads
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@3477 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/include')
-rw-r--r-- | nuttx/include/nuttx/sched.h | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/nuttx/include/nuttx/sched.h b/nuttx/include/nuttx/sched.h index 1b5d28f82..78e6f6b37 100644 --- a/nuttx/include/nuttx/sched.h +++ b/nuttx/include/nuttx/sched.h @@ -66,10 +66,14 @@ /* Values for the _TCB flags flag bits */ -#define TCB_FLAG_PTHREAD 0x0001 /* Thread is a pthread */ -#define TCB_FLAG_NONCANCELABLE 0x0002 /* Pthread is non-cancelable */ -#define TCB_FLAG_CANCEL_PENDING 0x0004 /* Pthread cancel is pending */ -#define TCB_FLAG_ROUND_ROBIN 0x0008 /* Round robin sched enabled */ +#define TCB_FLAG_TTYPE_SHIFT (0) /* Bits 0-1: thread type */ +#define TCB_FLAG_TTYPE_MASK (3 << TCB_FLAG_TTYPE_SHIFT) +# define TCB_FLAG_TTYPE_TASK (0 << TCB_FLAG_TTYPE_SHIFT) /* Normal user task */ +# define TCB_FLAG_TTYPE_PTHREAD (1 << TCB_FLAG_TTYPE_SHIFT) /* User pthread */ +# define TCB_FLAG_TTYPE_KERNEL (2 << TCB_FLAG_TTYPE_SHIFT) /* Kernel thread */ +#define TCB_FLAG_NONCANCELABLE (1 << 2) /* Bit 2: Pthread is non-cancelable */ +#define TCB_FLAG_CANCEL_PENDING (1 << 3) /* Bit 3: Pthread cancel is pending */ +#define TCB_FLAG_ROUND_ROBIN (1 << 4) /* Bit 4: Round robin sched enabled */ /******************************************************************************** * Global Type Definitions |