From 9136c408339b95b10a5ac54dd3eeb2dd189a19d5 Mon Sep 17 00:00:00 2001 From: Ningx Zhao Date: Sun, 25 Apr 2021 16:23:52 +0800 Subject: [PATCH] tests: poll: revised document error Some description about poll are not right, adding some new description to revise it. Fixes #33712 Signed-off-by: Ningx Zhao --- doc/reference/kernel/other/polling.rst | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/doc/reference/kernel/other/polling.rst b/doc/reference/kernel/other/polling.rst index fc0be93b59cf43..281dfe2b1171fc 100644 --- a/doc/reference/kernel/other/polling.rst +++ b/doc/reference/kernel/other/polling.rst @@ -123,11 +123,10 @@ amount of time, or the special values :c:macro:`K_NO_WAIT` and :c:macro:`K_FOREVER` to either not wait or wait until an event condition is satisfied and not sooner. -Only one thread can poll on a semaphore or a FIFO at a time. If a second thread -tries to poll on the same semaphore or FIFO, :c:func:`k_poll` immediately -returns with the return value -:c:macro:`EADDRINUSE`. In that case, if other -conditions passed to :c:func:`k_poll` were met, their state will be set in -the corresponding poll event. +A list of pollers is offered on each semaphore or FIFO and as many events +can wait in it as the app wants. +Notice that the waiters will be served in first-come-first-serve order, +not in priority order. In case of success, :c:func:`k_poll` returns 0. If it times out, it returns -:c:macro:`EAGAIN`.