Skip to content

Commit

Permalink
[CORE] Fix spin_trylock() function for non SMP.
Browse files Browse the repository at this point in the history
This allows "non SMP" (and in particular ARM9) to work with v0.2.7

Signed-off-by: Jean-Christophe Dubois <jcd@tribudubois.net>
  • Loading branch information
jcdubois authored and avpatel committed Nov 14, 2015
1 parent 9db5cd1 commit 375b8c5
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions core/include/vmm_spinlocks.h
Expand Up @@ -159,6 +159,7 @@ extern void vmm_scheduler_preempt_enable(void);
int ret; \
vmm_scheduler_preempt_disable(); \
if ((lock)->__tlock) { \
vmm_scheduler_preempt_enable(); \
ret = 0; \
} else { \
(lock)->__tlock = 1; \
Expand Down Expand Up @@ -301,6 +302,8 @@ extern void vmm_scheduler_preempt_enable(void);
arch_cpu_irq_save((flags)); \
vmm_scheduler_preempt_disable(); \
if ((lock)->__tlock) { \
vmm_scheduler_preempt_enable(); \
arch_cpu_irq_restore(flags); \
ret = 0; \
} else { \
(lock)->__tlock = 1; \
Expand Down

0 comments on commit 375b8c5

Please sign in to comment.