kernel: add `k_can_yield` helper function
Implements a function that application and driver code can use to check
whether it is valid to yield (or block) in the current context. This
check is required for functions that can feasibly be run from multiple
contexts. The primary intended use case is power management transition
functions, which can be run by application code explicitly or
automatically in the idle thread by system PM.
Signed-off-by:
Jordan Yates <jordan.yates@data61.csiro.au>
Loading
Please sign in to comment