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
122#ifdef CONFIG_SCHED_CPU_MASK
124#if CONFIG_MP_MAX_NUM_CPUS <= 8
134#ifdef CONFIG_SYS_CLOCK_EXISTS
136 struct _timeout timeout;
139#ifdef CONFIG_TIMESLICE_PER_THREAD
145#ifdef CONFIG_SCHED_THREAD_USAGE
150typedef struct _thread_base _thread_base_t;
152#if defined(CONFIG_THREAD_STACK_INFO)
154struct _thread_stack_info {
175#if defined(CONFIG_THREAD_STACK_MEM_MAPPED)
186typedef struct _thread_stack_info _thread_stack_info_t;
189#if defined(CONFIG_USERSPACE)
190struct _mem_domain_info {
199#ifdef CONFIG_THREAD_USERSPACE_LOCAL_DATA
200struct _thread_userspace_local_data {
201#if defined(CONFIG_ERRNO) && !defined(CONFIG_ERRNO_IN_TLS) && !defined(CONFIG_LIBC_ERRNO)
208#ifdef CONFIG_SCHED_THREAD_USAGE
217#ifdef CONFIG_SCHED_THREAD_USAGE_ANALYSIS
230#ifdef CONFIG_SCHED_THREAD_USAGE_ALL
240#if defined(__cplusplus) && !defined(CONFIG_SCHED_THREAD_USAGE) && \
241 !defined(CONFIG_SCHED_THREAD_USAGE_ANALYSIS) && !defined(CONFIG_SCHED_THREAD_USAGE_ALL)
272#if defined(CONFIG_POLL)
273 struct z_poller poller;
276#if defined(CONFIG_EVENTS)
283 bool no_wake_on_timeout;
286#if defined(CONFIG_THREAD_MONITOR)
294#if defined(CONFIG_THREAD_NAME)
296 char name[CONFIG_THREAD_MAX_NAME_LEN];
299#ifdef CONFIG_THREAD_CUSTOM_DATA
304#ifdef CONFIG_THREAD_USERSPACE_LOCAL_DATA
305 struct _thread_userspace_local_data *userspace_local_data;
308#if defined(CONFIG_ERRNO) && !defined(CONFIG_ERRNO_IN_TLS) && !defined(CONFIG_LIBC_ERRNO)
309#ifndef CONFIG_USERSPACE
315#if defined(CONFIG_THREAD_STACK_INFO)
320#if defined(CONFIG_USERSPACE)
337#if defined(CONFIG_USE_SWITCH)
351#if defined(CONFIG_THREAD_LOCAL_STORAGE)
356#ifdef CONFIG_DEMAND_PAGING_THREAD_STATS
363 struct _pipe_desc pipe_desc;
366#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:380
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:307
__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:259
struct _thread_base base
Definition thread.h:261
struct k_thread * next_thread
next item in list of all threads
Definition thread.h:291
struct _thread_arch arch
arch-specifics: must always be at the end
Definition thread.h:376
void * init_data
static thread init data
Definition thread.h:267
void * switch_handle
Context handle returned via arch_switch()
Definition thread.h:346
struct k_heap * resource_pool
resource pool
Definition thread.h:349
k_thread_stack_t * stack_obj
Base address of thread stack.
Definition thread.h:330
void * custom_data
crude thread-local storage
Definition thread.h:301
struct __thread_entry entry
thread entry and parameters description
Definition thread.h:288
void * syscall_frame
current syscall frame pointer
Definition thread.h:333
struct _thread_stack_info stack_info
Stack Info.
Definition thread.h:317
_wait_q_t join_queue
threads waiting in k_thread_join()
Definition thread.h:270
struct _mem_domain_info mem_domain_info
memory domain info of the thread
Definition thread.h:322
_wait_q_t halt_queue
threads waiting in k_thread_suspend()
Definition thread.h:372
int swap_retval
z_swap() return value
Definition thread.h:343
struct _callee_saved callee_saved
defined by the architecture, but all archs need these
Definition thread.h:264
Balanced red/black tree node structure.
Definition rb.h:58