@@ -245,6 +245,10 @@ A thread's initial priority value can be altered up or down after the thread
245
245
has been started. Thus it is possible for a preemptible thread to become
246
246
a cooperative thread, and vice versa, by changing its priority.
247
247
248
+ .. note ::
249
+ The scheduler does not make heuristic decisions to re-prioritize threads.
250
+ Thread priorities are set and changed only at the application's request.
251
+
248
252
The kernel supports a virtually unlimited number of thread priority levels.
249
253
The configuration options :kconfig: `CONFIG_NUM_COOP_PRIORITIES ` and
250
254
:kconfig: `CONFIG_NUM_PREEMPT_PRIORITIES ` specify the number of priority
@@ -269,9 +273,10 @@ When enabled (see :kconfig:`CONFIG_NUM_METAIRQ_PRIORITIES`), there is a special
269
273
subclass of cooperative priorities at the highest (numerically lowest)
270
274
end of the priority space: meta-IRQ threads. These are scheduled
271
275
according to their normal priority, but also have the special ability
272
- to preempt all other threads (and other meta-irq threads) at lower
276
+ to preempt all other threads (and other meta-IRQ threads) at lower
273
277
priorities, even if those threads are cooperative and/or have taken a
274
- scheduler lock.
278
+ scheduler lock. Meta-IRQ threads are still threads, however,
279
+ and can still be interrupted by any hardware interrupt.
275
280
276
281
This behavior makes the act of unblocking a meta-IRQ thread (by any
277
282
means, e.g. creating it, calling k_sem_give(), etc.) into the
@@ -284,7 +289,7 @@ run before the current CPU returns into application code.
284
289
285
290
Unlike similar features in other OSes, meta-IRQ threads are true
286
291
threads and run on their own stack (which must be allocated normally),
287
- not the per-CPU interrupt stack. Design work to enable the use of the
292
+ not the per-CPU interrupt stack. Design work to enable the use of the
288
293
IRQ stack on supported architectures is pending.
289
294
290
295
Note that because this breaks the promise made to cooperative
0 commit comments