X-Git-Url: http://git.droids-corp.org/?p=aversive.git;a=blobdiff_plain;f=include%2Faversive%2Firq_lock.h;fp=include%2Faversive%2Firq_lock.h;h=ec45b68672cc55a9354abe9d67527e8b400d82d8;hp=c8afdc408b3726c0488884ed5ab2ce32a4c75977;hb=a16ba178c7ef15fb408593b0e7c666ed2ed1d253;hpb=87ccd3af8abb0da3e0fa98dc8e9216fc7b676f97 diff --git a/include/aversive/irq_lock.h b/include/aversive/irq_lock.h index c8afdc4..ec45b68 100644 --- a/include/aversive/irq_lock.h +++ b/include/aversive/irq_lock.h @@ -42,10 +42,12 @@ #ifdef HOST_VERSION +#include + /* we must use 'flags' to avoid a warning */ -#define IRQ_UNLOCK(flags) flags=0 -#define IRQ_LOCK(flags) flags=0 -#define GLOBAL_IRQ_ARE_MASKED() (1) +#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