Lines Matching +full:operation +full:- +full:mode
7 allowed calling context (thread, ISR, pre-kernel), the effect of a call
14 :ref:`api_term_no-wait`
17 :ref:`api_term_isr-ok`
20 :ref:`api_term_pre-kernel-ok`
25 if the function may return before the operation it initializes is
26 complete (i.e. function return and operation completion are
44 -------
48 a consequence of a higher-priority thread being made ready. Whether the
49 suspension actually occurs depends on the operation associated with the
73 -----------
76 applications that use only non-preemptible threads, because the kernel
77 will not replace a running cooperative-only thread at a reschedule point
78 unless that thread has explicitly invoked an operation that caused it to
82 but that the operation may require an invoking thread that would have to
84 its operation. This behavior may be mediated by **no-wait**.
91 pre-kernel contexts if and only if invoked in **no-wait** mode.
93 .. _api_term_no-wait:
95 no-wait
98 The no-wait attribute is used on a function that is also **sleep** to
103 -----------
105 The paradigmatic case of a no-wait function is a function that takes a
107 this special timeout value are to execute the function's operation as
111 It is use of the no-wait feature that allows functions like
115 A function with a no-wait path does not imply that taking that path
119 pre-kernel contexts only when the parameter selects the no-wait path.
121 .. _api_term_isr-ok:
123 isr-ok
126 The isr-ok attribute is used on a function to indicate that it works
130 -----------
132 Any function that is not **sleep** is inherently **isr-ok**. Functions
133 that are **sleep** are **isr-ok** if the implementation ensures that the
136 calling context and transfer the operation that would sleep to a thread,
137 or by documenting that when invoked from a non-thread context the
138 function will return a specific error (generally ``-EWOULDBLOCK``).
140 Note that a function that is **no-wait** is safe to call from interrupt
141 context only when the no-wait path is selected. **isr-ok** functions
142 need not provide a no-wait path.
144 .. _api_term_pre-kernel-ok:
146 pre-kernel-ok
149 The pre-kernel-ok attribute is used on a function to indicate that it
154 -----------
156 This attribute is similar to **isr-ok** in function, but is intended for
161 Generally a function that is **pre-kernel-ok** checks
164 :c:func:`k_is_in_isr` so it can be **isr-ok** as well.
172 operation it initiates has completed. An asynchronous function will
173 generally provide a mechanism by which operation completion is reported,
176 A function that is not asynchronous is synchronous, i.e. the operation
182 -----------
184 Be aware that **async** is orthogonal to context-switching. Some APIs
186 while waiting for the resource necessary to initiate the operation; an
189 If a function is both **no-wait** and **async** then selecting the
190 no-wait path only guarantees that the function will not sleep. It does
191 not affect whether the operation will be completed before the function
199 The supervisor attribute is relevant only in user-mode applications, and
200 indicates that the function cannot be invoked from user mode.