poll: k_poll: Return -EINTR if not ready
In case _handle_obj_poll_events is called with K_POLL_STATE_NOT_READY set -EINTR as return to the poller thread. Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
This commit is contained in:
parent
f87c4c6743
commit
fc775a095c
1 changed files with 2 additions and 1 deletions
|
@ -292,7 +292,8 @@ static int _signal_poll_event(struct k_poll_event *event, u32_t state,
|
|||
|
||||
_unpend_thread(thread);
|
||||
_abort_thread_timeout(thread);
|
||||
_set_thread_return_value(thread, 0);
|
||||
_set_thread_return_value(thread,
|
||||
state == K_POLL_STATE_NOT_READY ? -EINTR : 0);
|
||||
|
||||
if (!_is_thread_ready(thread)) {
|
||||
goto ready_event;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue