20#ifndef ZEPHYR_KERNEL_INCLUDE_KERNEL_STRUCTS_H_
21#define ZEPHYR_KERNEL_INCLUDE_KERNEL_STRUCTS_H_
23#if !defined(_ASMLANGUAGE)
47#define _THREAD_DUMMY (BIT(0))
50#define _THREAD_PENDING (BIT(1))
53#define _THREAD_PRESTART (BIT(2))
56#define _THREAD_DEAD (BIT(3))
59#define _THREAD_SUSPENDED (BIT(4))
62#define _THREAD_ABORTING (BIT(5))
65#define _THREAD_QUEUED (BIT(7))
69#ifdef CONFIG_STACK_SENTINEL
71#define STACK_SENTINEL 0xF0F0F0F0
75#define _NON_PREEMPT_THRESHOLD 0x0080U
78#define _PREEMPT_THRESHOLD (_NON_PREEMPT_THRESHOLD - 1U)
80#if !defined(_ASMLANGUAGE)
88#if defined(CONFIG_SCHED_DUMB)
90#elif defined(CONFIG_SCHED_SCALABLE)
92#elif defined(CONFIG_SCHED_MULTIQ)
97typedef struct _ready_q _ready_q_t;
112#if (CONFIG_NUM_METAIRQ_PRIORITIES > 0) && (CONFIG_NUM_COOP_PRIORITIES > 0)
117#ifdef CONFIG_TIMESLICING
130 struct _cpu_arch arch;
133typedef struct _cpu _cpu_t;
146 struct _ready_q ready_q;
148#ifdef CONFIG_FPU_SHARING
162#if defined(CONFIG_THREAD_MONITOR)
167typedef struct z_kernel _kernel_t;
169extern struct z_kernel _kernel;
176bool z_smp_cpu_mobile(
void);
178#define _current_cpu ({ __ASSERT_NO_MSG(!z_smp_cpu_mobile()); \
180#define _current z_current_get()
183#define _current_cpu (&_kernel.cpus[0])
184#define _current _kernel.cpus[0].current
189#ifdef CONFIG_WAITQ_SCALABLE
192 struct _priq_rb waitq;
195extern bool z_priq_rb_lessthan(
struct rbnode *a,
struct rbnode *b);
197#define Z_WAIT_Q_INIT(wait_q) { { { .lessthan_fn = z_priq_rb_lessthan } } }
205#define Z_WAIT_Q_INIT(wait_q) { SYS_DLIST_STATIC_INIT(&(wait_q)->waitq) }
212typedef void (*_timeout_func_t)(
struct _timeout *
t);
217#ifdef CONFIG_TIMEOUT_64BIT
Doubly-linked list implementation.
static struct k_thread threads[2]
Definition: errno.c:25
void
Definition: eswifi_shell.c:15
struct _dnode sys_dnode_t
Definition: dlist.h:49
struct _dnode sys_dlist_t
Definition: dlist.h:48
struct k_thread t
Definition: kobject.c:1316
__UINT32_TYPE__ uint32_t
Definition: stdint.h:60
__INT32_TYPE__ int32_t
Definition: stdint.h:44
__UINT8_TYPE__ uint8_t
Definition: stdint.h:58
__INT64_TYPE__ int64_t
Definition: stdint.h:45
void idle(void *p1, void *p2, void *p3)
#define CONFIG_MP_NUM_CPUS
Definition: ztest.h:38