mirror of
https://github.com/apache/nuttx.git
synced 2026-06-05 15:58:59 +08:00
sched/tcb: add free tcb flag to support static tcb
Add support for static tcb, applications in some special case can initialize system resources in advance through static tcb. | static struct task_tcb_s g_tcb; | | memset(&g_tcb, 0, sizeof(struct task_tcb_s)); | g_tcb.cmn.flags = TCB_FLAG_TTYPE_KERNEL; | nxtask_init(&g_tcb, "PTCB", 101, NULL, 1024, ptcb_task, NULL, NULL, NULL); | | ... | nxtask_activate(&g_tcb.cmn); Signed-off-by: chao an <anchao@lixiang.com>
This commit is contained in:
@@ -104,6 +104,7 @@
|
||||
#define TCB_FLAG_HEAP_DUMP (1 << 11) /* Bit 11: Heap dump */
|
||||
#define TCB_FLAG_DETACHED (1 << 12) /* Bit 12: Pthread detached */
|
||||
#define TCB_FLAG_FORCED_CANCEL (1 << 13) /* Bit 13: Pthread cancel is forced */
|
||||
#define TCB_FLAG_FREE_TCB (1 << 14) /* Bit 14: Free tcb after exit */
|
||||
|
||||
/* Values for struct task_group tg_flags */
|
||||
|
||||
|
||||
Reference in New Issue
Block a user