From 375b8c569071cb8bf543af8b52477e0480f93100 Mon Sep 17 00:00:00 2001 From: Jean-Christophe Dubois Date: Sat, 14 Nov 2015 17:57:23 +0530 Subject: [PATCH] [CORE] Fix spin_trylock() function for non SMP. This allows "non SMP" (and in particular ARM9) to work with v0.2.7 Signed-off-by: Jean-Christophe Dubois --- core/include/vmm_spinlocks.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/core/include/vmm_spinlocks.h b/core/include/vmm_spinlocks.h index 1501be0a1e..0a15a40150 100644 --- a/core/include/vmm_spinlocks.h +++ b/core/include/vmm_spinlocks.h @@ -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; \ @@ -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; \