diff options
Diffstat (limited to 'sys/arch/arm/include/atomic.h')
-rw-r--r-- | sys/arch/arm/include/atomic.h | 24 |
1 files changed, 3 insertions, 21 deletions
diff --git a/sys/arch/arm/include/atomic.h b/sys/arch/arm/include/atomic.h index a6a27b36b72..ebdc3ade1c6 100644 --- a/sys/arch/arm/include/atomic.h +++ b/sys/arch/arm/include/atomic.h @@ -1,4 +1,4 @@ -/* $OpenBSD: atomic.h,v 1.6 2010/04/21 03:03:25 deraadt Exp $ */ +/* $OpenBSD: atomic.h,v 1.7 2010/04/22 21:03:17 drahn Exp $ */ /* Public Domain */ @@ -7,31 +7,13 @@ #if defined(_KERNEL) -#include <arm/armreg.h> -#include <arm/cpufunc.h> - /* * on pre-v6 arm processors, it is necessary to disable interrupts if * in the kernel and atomic updates are necessary without full mutexes */ -static __inline void -atomic_setbits_int(__volatile unsigned int *uip, unsigned int v) -{ - int oldirqstate; - oldirqstate = disable_interrupts(I32_bit|F32_bit); - *uip |= v; - restore_interrupts(oldirqstate); -} - -static __inline void -atomic_clearbits_int(__volatile unsigned int *uip, unsigned int v) -{ - int oldirqstate; - oldirqstate = disable_interrupts(I32_bit|F32_bit); - *uip &= ~v; - restore_interrupts(oldirqstate); -} +void atomic_setbits_int(__volatile unsigned int *, unsigned int); +void atomic_clearbits_int(__volatile unsigned int *, unsigned int); #endif /* defined(_KERNEL) */ #endif /* __ARM_ATOMIC_H__ */ |