24static struct rt_cpu _cpus[RT_CPUS_NR];
26#if defined(RT_DEBUGING_SPINLOCK)
27void *_cpus_lock_owner = 0;
28void *_cpus_lock_pc = 0;
39 rt_hw_spin_lock_init(&lock->
lock);
132 return &_cpus[index];
160#ifdef RT_DEBUGING_SPINLOCK
162 _cpus_lock_pc = __GET_RETURN_ADDRESS;
188#if defined(RT_DEBUGING_SPINLOCK)
189 _cpus_lock_owner = __OWNER_MAGIC;
193 critical_level = _cpus_critical_level;
194 _cpus_critical_level = 0;
213#if defined(ARCH_MM_MMU) && defined(RT_USING_SMART)
214 lwp_aspace_switch(thread);
216 rt_sched_post_ctx_switch(thread);
rt_base_t rt_cpus_lock(void)
This function will lock all cpus's scheduler and disable local irq.
void rt_cpus_unlock(rt_base_t level)
This function will restore all cpus's scheduler and restore local irq.
struct rt_cpu * rt_cpu_index(int index)
This fucntion will return the cpu object corresponding to index.
struct rt_cpu * rt_cpu_self(void)
This fucntion will return current cpu object.
rt_hw_spinlock_t _cpus_lock
void rt_cpus_lock_status_restore(struct rt_thread *thread)
rt_base_t rt_cpu_get_id(void)
Get logical CPU ID
rt_base_t rt_spin_lock_irqsave(struct rt_spinlock *lock)
This function will disable the local interrupt and then lock the spinlock, will lock the thread sched...
void rt_spin_lock(struct rt_spinlock *lock)
This function will lock the spinlock, will lock the thread scheduler.
void rt_spin_lock_init(struct rt_spinlock *lock)
Initialize a static spinlock object.
void rt_spin_unlock(struct rt_spinlock *lock)
This function will unlock the spinlock, will unlock the thread scheduler.
void rt_spin_unlock_irqrestore(struct rt_spinlock *lock, rt_base_t level)
This function will unlock the spinlock and then restore current cpu interrupt status,...
rt_weak rt_bool_t rt_hw_interrupt_is_disabled(void)
rt_inline rt_bool_t rt_scheduler_is_available(void)
#define rt_sched_thread_is_binding(thread)
void rt_exit_critical_safe(rt_base_t critical_level)
rt_base_t rt_enter_critical(void)
This function will lock the thread scheduler.
rt_uint16_t rt_critical_level(void)
Get the scheduler lock level.
#define rt_atomic_sub(ptr, v)
#define rt_atomic_add(ptr, v)
#define rt_atomic_load(ptr)
#define rt_hw_spin_lock(lock)
#define rt_hw_spin_unlock(lock)
#define rt_hw_local_irq_disable
#define rt_hw_local_irq_enable
#define RTM_EXPORT(symbol)
#define RT_SPIN_UNLOCK_DEBUG(lock, critical)
#define RT_SPIN_LOCK_DEBUG(lock)
struct rt_thread * current_thread