Skip to content

Commit

Permalink
tests: poll: revised document error
Browse files Browse the repository at this point in the history
Some description about poll are not right,
adding some new description to revise it.

Fixes zephyrproject-rtos#33712

Signed-off-by: Ningx Zhao <ningx.zhao@intel.com>
  • Loading branch information
Zhaoningx committed Apr 29, 2021
1 parent e6248db commit bb75a0b
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions doc/reference/kernel/other/polling.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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`.
Expand Down

0 comments on commit bb75a0b

Please sign in to comment.