]> git.droids-corp.org - aversive.git/blobdiff - include/aversive/irq_lock.h
merge hostsim in main
[aversive.git] / include / aversive / irq_lock.h
index ec45b68672cc55a9354abe9d67527e8b400d82d8..055c2479125b457ffdff147616356ed45a96c0d7 100644 (file)
 
 #ifdef HOST_VERSION
 
+#ifdef CONFIG_MODULE_HOSTSIM
 #include <hostsim.h>
 
 /* we must use 'flags' to avoid a warning */
-#define IRQ_UNLOCK(flags) do { flags=0; hostsim_lock(); } while(0)
-#define IRQ_LOCK(flags) do { flags=0; hostsim_unlock(); } while(0)
+#define IRQ_UNLOCK(flags) do { flags=0; /* hostsim_lock(); */ } while(0)
+#define IRQ_LOCK(flags) do { flags=0; /* hostsim_unlock(); */ } while(0)
 #define GLOBAL_IRQ_ARE_MASKED() hostsim_islocked()
+#else
+#define IRQ_UNLOCK(flags) do { flags=0; } while(0)
+#define IRQ_LOCK(flags) do { flags=0; } while(0)
+#define GLOBAL_IRQ_ARE_MASKED() (0)
+#endif /* CONFIG_MODULE_HOSTSIM */
 
 #else