kernel: add arch interface for idle functions
k_cpu_idle() and k_cpu_atomic_idle() were being directly implemented by arch code. Rename these implementations to z_arch_cpu_idle() and z_arch_cpu_atomic_idle(), and call them from new inline function definitions in kernel.h. Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
This commit is contained in:
parent
845aa6d114
commit
07525a3d54
20 changed files with 61 additions and 66 deletions
|
@ -4630,6 +4630,9 @@ extern void z_handle_obj_poll_events(sys_dlist_t *events, u32_t state);
|
|||
* @{
|
||||
*/
|
||||
|
||||
extern void z_arch_cpu_idle(void);
|
||||
extern void z_arch_cpu_atomic_idle(unsigned int key);
|
||||
|
||||
/**
|
||||
* @brief Make the CPU idle.
|
||||
*
|
||||
|
@ -4643,7 +4646,10 @@ extern void z_handle_obj_poll_events(sys_dlist_t *events, u32_t state);
|
|||
* @return N/A
|
||||
* @req K-CPU-IDLE-001
|
||||
*/
|
||||
extern void k_cpu_idle(void);
|
||||
static inline void k_cpu_idle(void)
|
||||
{
|
||||
z_arch_cpu_idle();
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Make the CPU idle in an atomic fashion.
|
||||
|
@ -4656,7 +4662,10 @@ extern void k_cpu_idle(void);
|
|||
* @return N/A
|
||||
* @req K-CPU-IDLE-002
|
||||
*/
|
||||
extern void k_cpu_atomic_idle(unsigned int key);
|
||||
static inline void k_cpu_atomic_idle(unsigned int key)
|
||||
{
|
||||
z_arch_cpu_atomic_idle(key);
|
||||
}
|
||||
|
||||
/**
|
||||
* @}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue