7#ifndef ZEPHYR_INCLUDE_ARCH_RISCV_ARCH_INLINES_H_
8#define ZEPHYR_INCLUDE_ARCH_RISCV_ARCH_INLINES_H_
23#if defined(CONFIG_SMP) || defined(CONFIG_USERSPACE)
26 return &_kernel.cpus[0];
30#ifdef CONFIG_RISCV_CURRENT_VIA_GP
31register struct k_thread *__arch_current_thread __asm__(
"gp");
33#define arch_current_thread() __arch_current_thread
34#define arch_current_thread_set(thread) \
36 __arch_current_thread = _current_cpu->current = (thread); \
42 return CONFIG_MP_MAX_NUM_CPUS;
static ALWAYS_INLINE _cpu_t * arch_curr_cpu(void)
Definition arch_inlines.h:17
static ALWAYS_INLINE uint32_t arch_proc_id(void)
Definition arch_inlines.h:30
static ALWAYS_INLINE unsigned int arch_num_cpus(void)
Definition arch_inlines.h:39
#define csr_read(csr)
Definition csr.h:185
__UINT32_TYPE__ uint32_t
Definition stdint.h:90
__UINTPTR_TYPE__ uintptr_t
Definition stdint.h:105
Thread Structure.
Definition thread.h:259