queue: Use k_poll if enabled

This makes use of POLL_EVENT in case k_poll is enabled which is
preferable over wait_q as that allows objects to be removed for the
data_q at any time.

Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
This commit is contained in:
Luiz Augusto von Dentz 2017-07-13 12:43:59 +03:00 committed by Anas Nashif
commit 84db641de6
4 changed files with 74 additions and 27 deletions

View file

@ -1313,9 +1313,12 @@ extern u32_t k_uptime_delta_32(s64_t *reftime);
*/
struct k_queue {
_wait_q_t wait_q;
sys_slist_t data_q;
_POLL_EVENT;
union {
_wait_q_t wait_q;
_POLL_EVENT;
};
_OBJECT_TRACING_NEXT_PTR(k_queue);
};