restore smp macro define. (#8151)

This commit is contained in:
geniusgogo 2023-10-20 13:25:47 +08:00 committed by GitHub
parent 1f05b6b401
commit 552b5406b5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 6 additions and 8 deletions

View File

@ -727,11 +727,11 @@ enum
#define RT_THREAD_CTRL_INFO 0x03 /**< Get thread information. */
#define RT_THREAD_CTRL_BIND_CPU 0x04 /**< Set thread bind cpu. */
#ifdef RT_USING_SMP
#define RT_CPU_DETACHED RT_CPUS_NR /**< The thread not running on cpu. */
#define RT_CPU_MASK ((1 << RT_CPUS_NR) - 1) /**< All CPUs mask bit. */
#ifdef RT_USING_SMP
#ifndef RT_SCHEDULE_IPI
#define RT_SCHEDULE_IPI 0
#endif /* RT_SCHEDULE_IPI */
@ -740,8 +740,6 @@ enum
#define RT_STOP_IPI 1
#endif /* RT_STOP_IPI */
#endif /* RT_USING_SMP */
struct rt_cpu_usage_stats
{
rt_uint64_t user;
@ -778,6 +776,8 @@ struct rt_cpu
};
typedef struct rt_cpu *rt_cpu_t;
#endif /* RT_USING_SMP */
struct rt_thread;
#ifdef RT_USING_SMART

View File

@ -127,8 +127,6 @@ void rt_hw_local_irq_enable(rt_base_t level);
#define rt_hw_interrupt_disable rt_cpus_lock
#define rt_hw_interrupt_enable rt_cpus_unlock
#else
#define rt_hw_local_irq_disable rt_hw_interrupt_disable
#define rt_hw_local_irq_enable rt_hw_interrupt_enable
rt_base_t rt_hw_interrupt_disable(void);
void rt_hw_interrupt_enable(rt_base_t level);
#endif /*RT_USING_SMP*/

View File

@ -624,11 +624,11 @@ void rt_interrupt_leave(void);
rt_base_t rt_cpus_lock(void);
void rt_cpus_unlock(rt_base_t level);
#endif /* RT_USING_SMP */
struct rt_cpu *rt_cpu_self(void);
struct rt_cpu *rt_cpu_index(int index);
#endif /* RT_USING_SMP */
/*
* the number of nested interrupts.
*/