【OS】RTOS任务的几种状态

张开发
2026/4/18 18:08:58 15 分钟阅读

分享文章

【OS】RTOS任务的几种状态
FreeRTOS任务的几种状态官方文档说是只有4种状态但是根据程序的API还有一个“僵尸态”eDeleted。/* Task states returned by eTaskGetState. */ typedef enum { eRunning 0, /* A task is querying the state of itself, so must be running. */ eReady, /* The task being queried is in a read or pending ready list. */ eBlocked, /* The task being queried is in the Blocked state. */ eSuspended, /* The task being queried is in the Suspended state, or is in the Blocked state with an infinite time out. */ eDeleted, /* The task being queried has been deleted, but its TCB has not yet been freed. */ eInvalid /* Used as an invalid state value. */ } eTaskState;

更多文章