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 {
52 unsigned char *buffer;
93#ifdef CONFIG_BIG_ENDIAN
104#ifdef CONFIG_SCHED_DEADLINE
108#if defined(CONFIG_SCHED_SCALABLE) || defined(CONFIG_WAITQ_SCALABLE)
124#ifdef CONFIG_SCHED_CPU_MASK
126#if CONFIG_MP_MAX_NUM_CPUS <= 8
136#ifdef CONFIG_SYS_CLOCK_EXISTS
138 struct _timeout timeout;
141#ifdef CONFIG_TIMESLICE_PER_THREAD
147#ifdef CONFIG_SCHED_THREAD_USAGE
152typedef struct _thread_base _thread_base_t;
154#if defined(CONFIG_THREAD_STACK_INFO)
156struct _thread_stack_info {
177#if defined(CONFIG_THREAD_STACK_MEM_MAPPED)
188typedef struct _thread_stack_info _thread_stack_info_t;
191#if defined(CONFIG_USERSPACE)
192struct _mem_domain_info {
199typedef struct _mem_domain_info _mem_domain_info_t;
202#ifdef CONFIG_THREAD_USERSPACE_LOCAL_DATA
203struct _thread_userspace_local_data {
204#if defined(CONFIG_ERRNO) && !defined(CONFIG_ERRNO_IN_TLS) && !defined(CONFIG_LIBC_ERRNO)
211#ifdef CONFIG_SCHED_THREAD_USAGE
220#ifdef CONFIG_SCHED_THREAD_USAGE_ANALYSIS
233#ifdef CONFIG_SCHED_THREAD_USAGE_ALL
243#if defined(__cplusplus) && !defined(CONFIG_SCHED_THREAD_USAGE) && \
244 !defined(CONFIG_SCHED_THREAD_USAGE_ANALYSIS) && !defined(CONFIG_SCHED_THREAD_USAGE_ALL)
275#if defined(CONFIG_POLL)
276 struct z_poller poller;
279#if defined(CONFIG_EVENTS)
286 bool no_wake_on_timeout;
289#if defined(CONFIG_THREAD_MONITOR)
297#if defined(CONFIG_THREAD_NAME)
299 char name[CONFIG_THREAD_MAX_NAME_LEN];
302#ifdef CONFIG_THREAD_CUSTOM_DATA
307#ifdef CONFIG_THREAD_USERSPACE_LOCAL_DATA
308 struct _thread_userspace_local_data *userspace_local_data;
311#if defined(CONFIG_ERRNO) && !defined(CONFIG_ERRNO_IN_TLS) && !defined(CONFIG_LIBC_ERRNO)
312#ifndef CONFIG_USERSPACE
318#if defined(CONFIG_THREAD_STACK_INFO)
323#if defined(CONFIG_USERSPACE)
340#if defined(CONFIG_USE_SWITCH)
354#if defined(CONFIG_THREAD_LOCAL_STORAGE)
359#ifdef CONFIG_DEMAND_PAGING_THREAD_STATS
366 struct _pipe_desc pipe_desc;
369#ifdef CONFIG_OBJ_CORE_THREAD
struct z_thread_stack_element k_thread_stack_t
Typedef of struct z_thread_stack_element.
Definition arch_interface.h:46
void(* k_thread_entry_t)(void *p1, void *p2, void *p3)
Thread entry point function type.
Definition arch_interface.h:48
struct _dnode sys_dnode_t
Doubly-linked list node structure.
Definition dlist.h:54
struct k_thread * k_tid_t
Definition thread.h:383
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:310
__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
Structure used to track internal statistics about both thread and CPU usage.
Definition stats.h:18
Memory Domain.
Definition mem_domain.h:80
Paging Statistics.
Definition demand_paging.h:37
Object core structure.
Definition obj_core.h:121
Thread Structure.
Definition thread.h:262
struct _thread_base base
Definition thread.h:264
struct k_thread * next_thread
next item in list of all threads
Definition thread.h:294
struct _thread_arch arch
arch-specifics: must always be at the end
Definition thread.h:379
void * init_data
static thread init data
Definition thread.h:270
void * switch_handle
Context handle returned via arch_switch()
Definition thread.h:349
struct k_heap * resource_pool
resource pool
Definition thread.h:352
k_thread_stack_t * stack_obj
Base address of thread stack.
Definition thread.h:333
void * custom_data
crude thread-local storage
Definition thread.h:304
struct __thread_entry entry
thread entry and parameters description
Definition thread.h:291
void * syscall_frame
current syscall frame pointer
Definition thread.h:336
struct _thread_stack_info stack_info
Stack Info.
Definition thread.h:320
_wait_q_t join_queue
threads waiting in k_thread_join()
Definition thread.h:273
struct _mem_domain_info mem_domain_info
memory domain info of the thread
Definition thread.h:325
_wait_q_t halt_queue
threads waiting in k_thread_suspend()
Definition thread.h:375
int swap_retval
z_swap() return value
Definition thread.h:346
struct _callee_saved callee_saved
defined by the architecture, but all archs need these
Definition thread.h:267
Balanced red/black tree node structure.
Definition rb.h:58