Re: Reg: Task state read function in zephyr ?

Benjamin Walsh <benjamin.walsh@...>

Hi Mahendra,

Is there any function in Zephyr rtos to know about the Task state ?

Ex: Before suspending a task , check using task state whether the task
is started or not and then suspend the task.

I know we can handle this using some flag.. But need to know any
function call is available in zephyr for this task state.
Not currently, you can ask for an enhancement that does this, or
contribute it yourself if you need it.

However, what is the use case ? If the thread has been spawned but has
not run yet, or if you start it with a timeout, and the timeout has not
expired yet, and you suspend the thread, there should not be any
problem. The 'suspend' state is just a bit in a set of thread states,
and multiple ones can exist concurrently.


Benjamin Walsh, SMTS
Wind River Rocket
Zephyr kernel maintainer

Join to automatically receive all group messages.