aboutsummaryrefslogtreecommitdiff
path: root/sys/i386/include/atomic.h
diff options
context:
space:
mode:
Diffstat (limited to 'sys/i386/include/atomic.h')
-rw-r--r--sys/i386/include/atomic.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/i386/include/atomic.h b/sys/i386/include/atomic.h
index 34ed3a6af8b1..bda2a620af00 100644
--- a/sys/i386/include/atomic.h
+++ b/sys/i386/include/atomic.h
@@ -143,7 +143,7 @@ void atomic_subtract_64(volatile uint64_t *, uint64_t);
* For userland, always use lock prefixes so that the binaries will run
* on both SMP and !SMP systems.
*/
-#if defined(SMP) || !defined(_KERNEL)
+#if defined(SMP) || !defined(_KERNEL) || defined(KLD_MODULE)
#define MPLOCKED "lock ; "
#else
#define MPLOCKED
@@ -302,7 +302,7 @@ atomic_testandclear_int(volatile u_int *p, u_int v)
*/
#if defined(_KERNEL)
-#if defined(SMP)
+#if defined(SMP) || defined(KLD_MODULE)
#define __storeload_barrier() __mbk()
#else /* _KERNEL && UP */
#define __storeload_barrier() __compiler_membar()