@@ -51,14 +51,14 @@ is waiting for is fulfilled. It is possible for more than one to be fulfilled
5151when :c:func: `k_poll ` returns, if they were fulfilled before
5252:c:func: `k_poll ` was called, or due to the preemptive multi-threading
5353nature of the kernel. The caller must look at the state of all the poll events
54- in the array to figured out which ones were fulfilled and what actions to take.
54+ in the array to figure out which ones were fulfilled and what actions to take.
5555
5656Currently, there is only one mode of operation available: the object is not
5757acquired. As an example, this means that when :c:func: `k_poll ` returns and
5858the poll event states that the semaphore is available, the caller of
5959:c:func: `k_poll() ` must then invoke :c:func: `k_sem_take ` to take
6060ownership of the semaphore. If the semaphore is contested, there is no
61- guarantee that it will be still available when :c:func: `k_sem_give ` is
61+ guarantee that it will be still available when :c:func: `k_sem_take ` is
6262called.
6363
6464Implementation
@@ -72,7 +72,7 @@ of type :c:struct:`k_poll_event`. Each entry in the array represents one
7272event a call to :c:func: `k_poll ` will wait for its condition to be
7373fulfilled.
7474
75- They can be initialized using either the runtime initializers
75+ Poll events can be initialized using either the runtime initializers
7676:c:macro: `K_POLL_EVENT_INITIALIZER() ` or :c:func: `k_poll_event_init `, or
7777the static initializer :c:macro: `K_POLL_EVENT_STATIC_INITIALIZER() `. An object
7878that matches the **type ** specified must be passed to the initializers. The
@@ -255,16 +255,16 @@ If the signal is to be polled in a loop, *both* its event state and its
255255 }
256256 }
257257
258- Note that poll signals are not internally synchronized. A k_poll call
258+ Note that poll signals are not internally synchronized. A :c:func: ` k_poll ` call
259259that is passed a signal will return after any code in the system calls
260260:c:func: `k_poll_signal_raise() `. But if the signal is being
261261externally managed and reset via :c:func: `k_poll_signal_init() `, it is
262262possible that by the time the application checks, the event state may
263263no longer be equal to :c:macro: `K_POLL_STATE_SIGNALED `, and a (naive)
264264application will miss events. Best practice is always to reset the
265- signal only from within the thread invoking the k_poll() loop, or else
265+ signal only from within the thread invoking the :c:func: ` k_poll ` loop, or else
266266to use some other event type which tracks event counts: semaphores and
267- FIFOs more more error-proof in this sense because they can't "miss"
267+ FIFOs are more error-proof in this sense because they can't "miss"
268268events, architecturally.
269269
270270Suggested Uses
0 commit comments