Skip to content
Snippets Groups Projects
Commit 6eee5783 authored by Gregory Nutt's avatar Gregory Nutt
Browse files

vfs/poll: add proper handling for sem_timedwait errnos. From Jussi Kivilinna

parent 21b12971
No related branches found
No related tags found
No related merge requests found
......@@ -334,6 +334,22 @@ int poll(FAR struct pollfd *fds, nfds_t nfds, int timeout)
}
ret = sem_timedwait(&sem, &abstime);
if (ret < 0)
{
int err = get_errno();
if (err == ETIMEDOUT)
{
/* Return zero (OK) in the event of a timeout */
ret = OK;
}
else
{
ret = -err;
}
}
irqrestore(flags);
}
else
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment