kernel: Change z_handle_obj_poll_events() return type
Changes the return type of z_handle_obj_poll_events() so that it returns true if there were polling events to handle (false otherwise). Signed-off-by: Peter Mitsis <peter.mitsis@intel.com>
This commit is contained in:
parent
790006f875
commit
70520e7a4d
2 changed files with 4 additions and 2 deletions
|
@ -221,7 +221,7 @@ void z_mem_manage_init(void);
|
||||||
void z_mem_manage_boot_finish(void);
|
void z_mem_manage_boot_finish(void);
|
||||||
|
|
||||||
|
|
||||||
void z_handle_obj_poll_events(sys_dlist_t *events, uint32_t state);
|
bool z_handle_obj_poll_events(sys_dlist_t *events, uint32_t state);
|
||||||
|
|
||||||
#ifdef CONFIG_PM
|
#ifdef CONFIG_PM
|
||||||
|
|
||||||
|
|
|
@ -454,7 +454,7 @@ static int signal_poll_event(struct k_poll_event *event, uint32_t state)
|
||||||
return retcode;
|
return retcode;
|
||||||
}
|
}
|
||||||
|
|
||||||
void z_handle_obj_poll_events(sys_dlist_t *events, uint32_t state)
|
bool z_handle_obj_poll_events(sys_dlist_t *events, uint32_t state)
|
||||||
{
|
{
|
||||||
struct k_poll_event *poll_event;
|
struct k_poll_event *poll_event;
|
||||||
k_spinlock_key_t key = k_spin_lock(&lock);
|
k_spinlock_key_t key = k_spin_lock(&lock);
|
||||||
|
@ -465,6 +465,8 @@ void z_handle_obj_poll_events(sys_dlist_t *events, uint32_t state)
|
||||||
}
|
}
|
||||||
|
|
||||||
k_spin_unlock(&lock, key);
|
k_spin_unlock(&lock, key);
|
||||||
|
|
||||||
|
return (poll_event != NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
void z_impl_k_poll_signal_init(struct k_poll_signal *sig)
|
void z_impl_k_poll_signal_init(struct k_poll_signal *sig)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue