7#ifndef ZEPHYR_INCLUDE_KERNEL_THREAD_H_
8#define ZEPHYR_INCLUDE_KERNEL_THREAD_H_
10#ifdef CONFIG_DEMAND_PAGING_THREAD_STATS
34#ifdef CONFIG_THREAD_MONITOR
35struct __thread_entry {
51 struct rbnode qnode_rb;
81#ifdef CONFIG_BIG_ENDIAN
92#ifdef CONFIG_SCHED_DEADLINE
96#if defined(CONFIG_SCHED_SCALABLE) || defined(CONFIG_WAITQ_SCALABLE)
112#ifdef CONFIG_SCHED_CPU_MASK
114#if CONFIG_MP_MAX_NUM_CPUS <= 8
124#ifdef CONFIG_SYS_CLOCK_EXISTS
126 struct _timeout timeout;
129#ifdef CONFIG_TIMESLICE_PER_THREAD
135#ifdef CONFIG_SCHED_THREAD_USAGE
136 struct k_cycle_stats usage;
140typedef struct _thread_base _thread_base_t;
142#if defined(CONFIG_THREAD_STACK_INFO)
144#if defined(CONFIG_THREAD_RUNTIME_STACK_SAFETY)
145struct _thread_stack_usage {
146 size_t unused_threshold;
151struct _thread_stack_info {
172#if defined(CONFIG_THREAD_STACK_MEM_MAPPED)
182#if defined(CONFIG_THREAD_RUNTIME_STACK_SAFETY)
183 struct _thread_stack_usage usage;
187typedef struct _thread_stack_info _thread_stack_info_t;
190#if defined(CONFIG_USERSPACE)
191struct _mem_domain_info {
192#ifdef CONFIG_MEM_DOMAIN_HAS_THREAD_LIST
197 struct k_mem_domain *mem_domain;
200typedef struct _mem_domain_info _mem_domain_info_t;
203#ifdef CONFIG_THREAD_USERSPACE_LOCAL_DATA
204struct _thread_userspace_local_data {
205#if defined(CONFIG_ERRNO) && !defined(CONFIG_ERRNO_IN_TLS) && !defined(CONFIG_LIBC_ERRNO)
212#ifdef CONFIG_SCHED_THREAD_USAGE
221#ifdef CONFIG_SCHED_THREAD_USAGE_ANALYSIS
234#ifdef CONFIG_SCHED_THREAD_USAGE_ALL
244#if defined(__cplusplus) && !defined(CONFIG_SCHED_THREAD_USAGE) && \
245 !defined(CONFIG_SCHED_THREAD_USAGE_ANALYSIS) && !defined(CONFIG_SCHED_THREAD_USAGE_ALL)
276#if defined(CONFIG_POLL)
277 struct z_poller poller;
280#if defined(CONFIG_EVENTS)
287 bool no_wake_on_timeout;
290#if defined(CONFIG_THREAD_MONITOR)
298#if defined(CONFIG_THREAD_NAME)
300 char name[CONFIG_THREAD_MAX_NAME_LEN];
303#ifdef CONFIG_THREAD_CUSTOM_DATA
308#ifdef CONFIG_THREAD_USERSPACE_LOCAL_DATA
309 struct _thread_userspace_local_data *userspace_local_data;
312#if defined(CONFIG_ERRNO) && !defined(CONFIG_ERRNO_IN_TLS) && !defined(CONFIG_LIBC_ERRNO)
313#ifndef CONFIG_USERSPACE
319#if defined(CONFIG_THREAD_STACK_INFO)
324#if defined(CONFIG_USERSPACE)
341#if defined(CONFIG_USE_SWITCH)
355#if defined(CONFIG_THREAD_LOCAL_STORAGE)
360#ifdef CONFIG_DEMAND_PAGING_THREAD_STATS
365#ifdef CONFIG_OBJ_CORE_THREAD
void(* k_thread_entry_t)(void *p1, void *p2, void *p3)
Thread entry point function type.
Definition arch_interface.h:48
struct z_thread_stack_element k_thread_stack_t
Typedef of struct z_thread_stack_element.
Definition arch_interface.h:46
struct _dnode sys_dnode_t
Doubly-linked list node structure.
Definition dlist.h:54
struct k_thread * k_tid_t
Definition thread.h:379
struct k_thread_runtime_stats k_thread_runtime_stats_t
void(* k_thread_timeslice_fn_t)(struct k_thread *thread, void *data)
Definition kernel_structs.h:313
__UINT32_TYPE__ uint32_t
Definition stdint.h:90
__INT32_TYPE__ int32_t
Definition stdint.h:74
__UINT64_TYPE__ uint64_t
Definition stdint.h:91
__UINT8_TYPE__ uint8_t
Definition stdint.h:88
__UINTPTR_TYPE__ uintptr_t
Definition stdint.h:105
__UINT16_TYPE__ uint16_t
Definition stdint.h:89
__INT8_TYPE__ int8_t
Definition stdint.h:72
Paging Statistics.
Definition demand_paging.h:37
Object core structure.
Definition obj_core.h:121
Thread Structure.
Definition thread.h:263
struct _thread_base base
Definition thread.h:265
struct k_thread * next_thread
next item in list of all threads
Definition thread.h:295
struct _thread_arch arch
arch-specifics: must always be at the end
Definition thread.h:375
void * init_data
static thread init data
Definition thread.h:271
void * switch_handle
Context handle returned via arch_switch().
Definition thread.h:350
struct k_heap * resource_pool
resource pool
Definition thread.h:353
k_thread_stack_t * stack_obj
Base address of thread stack.
Definition thread.h:334
void * custom_data
crude thread-local storage
Definition thread.h:305
struct __thread_entry entry
thread entry and parameters description
Definition thread.h:292
void * syscall_frame
current syscall frame pointer
Definition thread.h:337
struct _thread_stack_info stack_info
Stack Info.
Definition thread.h:321
_wait_q_t join_queue
threads waiting in k_thread_join()
Definition thread.h:274
struct _mem_domain_info mem_domain_info
memory domain info of the thread
Definition thread.h:326
_wait_q_t halt_queue
threads waiting in k_thread_suspend()
Definition thread.h:371
int swap_retval
z_swap() return value
Definition thread.h:347
struct _callee_saved callee_saved
defined by the architecture, but all archs need these
Definition thread.h:268