Lines Matching +full:execution +full:- +full:memory
25 * A **stack area**, which is a region of memory used for the thread's stack.
28 stack memory regions.
46 * An **execution mode**, which can either be supervisor or user mode.
48 privileged CPU instructions, the entire memory address space, and
67 to start thread execution immediately. Alternatively, the kernel can be
68 instructed to delay execution of the thread by specifying a timeout
69 value -- for example, to allow device hardware used by the thread
75 re-spawned before it can be used.
81 synchronously end its execution by returning from its entry point function.
85 it may own (such as mutexes and dynamically allocated memory)
91 thread self-exits, or the target thread aborts (either due to a
95 be made of the thread struct. The memory of such a struct can then be
96 re-used for any purpose, including spawning a new thread. Note that
107 A thread may asynchronously end its execution by **aborting**. The kernel
144 A thread that has no factors that prevent its execution is deemed
147 A thread that has one or more factors that prevent its execution
176 - There may need to be additional memory reserved for memory management
178 - If guard-based stack overflow detection is enabled, a small write-protected
179 memory management region must immediately precede the stack buffer
181 - If userspace is enabled, a separate fixed-size privilege elevation stack must
183 - If userspace is enabled, the thread's stack buffer must be appropriately
184 sized and aligned such that a memory protection region may be programmed
195 Kernel-only Stacks
202 These stacks save memory because an MPU region will never need to be
204 to reserve additional room for the privilege elevation stack, or memory
218 This may use more memory but the stack object is suitable for hosting
230 non-negative.
233 over thread B of priority 7; likewise thread C of priority -2 has higher
243 * A :dfn:`preemptible thread` has a non-negative priority value.
254 The scheduler does not make heuristic decisions to re-prioritize threads.
263 * cooperative threads: (-:kconfig:option:`CONFIG_NUM_COOP_PRIORITIES`) to -1
264 * preemptive threads: 0 to (:kconfig:option:`CONFIG_NUM_PREEMPT_PRIORITIES` - 1)
270 results in the ranges -5 to -1 and 0 to 9, respectively.
274 Meta-IRQ Priorities
279 end of the priority space: meta-IRQ threads. These are scheduled
281 to preempt all other threads (and other meta-IRQ threads) at lower
283 scheduler lock. Meta-IRQ threads are still threads, however,
286 This behavior makes the act of unblocking a meta-IRQ thread (by any
289 priority thread, or an ARM-like "pended IRQ" when done from true
295 Unlike similar features in other OSes, meta-IRQ threads are true
297 not the per-CPU interrupt stack. Design work to enable the use of the
330 This x86-specific option indicate that the thread uses the CPU's
361 Every thread has a 32-bit :dfn:`custom data` area, accessible only by
384 .. code-block:: c
402 Use thread custom data to allow a routine to access thread-specific information,
415 :c:macro:`K_KERNEL_STACK_DEFINE` to ensure it is properly set up in memory.
419 - The original requested stack size passed to
422 - For a stack object defined with the ``K_THREAD_STACK`` family of
425 - For a stack object defined with the ``K_KERNEL_STACK`` family of
434 .. code-block:: c
456 .. code-block:: c
474 ---------------------
485 i.e. it is not currently running and the stack memory is unused.
503 may perform a one-way transition to user mode using the
504 :c:func:`k_thread_user_mode_enter` API. This is a one-way operation which
505 will reset and zero the thread's stack memory. The thread will be marked
506 as non-essential.
515 .. code-block:: c
522 return; /* thread terminates from mid-entry point function */
531 mark the thread and stack objects as uninitialized so that they may be re-used.
538 execution cycles of a thread.
547 .. code-block:: c