Re: k_poll usage


Paul Sokolovsky
 

Hello Vakul,

On Fri, 13 Oct 2017 05:48:22 +0000
Vakul Garg <vakul.garg@nxp.com> wrote:

Hi

The zephyr documentation says k_poll to operate on objects - kernel
fifo, poll signal, semaphore. Can't it also be used on mailboxes,
message queues etc?
Looking at the include/kernel.h, all k_poll'able object must have
a .poll_events member (either directly or via _POLL_EVENT macro).
Mailboxes and message queues don't have it. This can be confirmed by
looking at kernel/poll.c:register_event(), which handles each of the
supported pollable objects via a switch statement.


Regards

Vakul


--
Best Regards,
Paul

Linaro.org | Open source software for ARM SoCs
Follow Linaro: http://www.facebook.com/pages/Linaro
http://twitter.com/#!/linaroorg - http://www.linaro.org/linaro-blog

Join users@lists.zephyrproject.org to automatically receive all group messages.