@@ -51,14 +51,14 @@ is waiting for is fulfilled. It is possible for more than one to be fulfilled
51
51
when :c:func: `k_poll ` returns, if they were fulfilled before
52
52
:c:func: `k_poll ` was called, or due to the preemptive multi-threading
53
53
nature 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.
55
55
56
56
Currently, there is only one mode of operation available: the object is not
57
57
acquired. As an example, this means that when :c:func: `k_poll ` returns and
58
58
the poll event states that the semaphore is available, the caller of
59
59
:c:func: `k_poll() ` must then invoke :c:func: `k_sem_take ` to take
60
60
ownership 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
62
62
called.
63
63
64
64
Implementation
@@ -72,7 +72,7 @@ of type :c:struct:`k_poll_event`. Each entry in the array represents one
72
72
event a call to :c:func: `k_poll ` will wait for its condition to be
73
73
fulfilled.
74
74
75
- They can be initialized using either the runtime initializers
75
+ Poll events can be initialized using either the runtime initializers
76
76
:c:macro: `K_POLL_EVENT_INITIALIZER() ` or :c:func: `k_poll_event_init `, or
77
77
the static initializer :c:macro: `K_POLL_EVENT_STATIC_INITIALIZER() `. An object
78
78
that 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
255
255
}
256
256
}
257
257
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
259
259
that is passed a signal will return after any code in the system calls
260
260
:c:func: `k_poll_signal_raise() `. But if the signal is being
261
261
externally managed and reset via :c:func: `k_poll_signal_init() `, it is
262
262
possible that by the time the application checks, the event state may
263
263
no longer be equal to :c:macro: `K_POLL_STATE_SIGNALED `, and a (naive)
264
264
application 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
266
266
to 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"
268
268
events, architecturally.
269
269
270
270
Suggested Uses
0 commit comments