7#ifndef ZEPHYR_INCLUDE_ARCH_RISCV_ARCH_INLINES_H_
8#define ZEPHYR_INCLUDE_ARCH_RISCV_ARCH_INLINES_H_
17#if defined(CONFIG_SMP) || defined(CONFIG_USERSPACE)
18#ifdef CONFIG_RISCV_S_MODE
24 return &_kernel.cpus[0];
30#ifdef CONFIG_RISCV_S_MODE
31#if defined(CONFIG_SMP) || (CONFIG_MP_MAX_NUM_CPUS > 1)
34 return CONFIG_RV_BOOT_HART;
41#ifdef CONFIG_RISCV_CURRENT_VIA_GP
43register struct k_thread *__arch_current_thread __asm__(
"gp");
45#define arch_current_thread() __arch_current_thread
46#define arch_current_thread_set(thread) ({ __arch_current_thread = (thread); })
52 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:234
__UINT32_TYPE__ uint32_t
Definition stdint.h:90
__UINTPTR_TYPE__ uintptr_t
Definition stdint.h:105
Thread Structure.
Definition thread.h:258