diff options
| author | John Baldwin <jhb@FreeBSD.org> | 2001-10-08 20:58:24 +0000 |
|---|---|---|
| committer | John Baldwin <jhb@FreeBSD.org> | 2001-10-08 20:58:24 +0000 |
| commit | 2a89a48fbd3bd5ae2c6af4f2b390ce40c9a0b953 (patch) | |
| tree | 7a930f31a6170373f1da0e34040e7441f9a58f59 | |
| parent | 275d9b59d3ccda841e81280aee8f210fe9419044 (diff) | |
Notes
| -rw-r--r-- | sys/amd64/include/atomic.h | 10 | ||||
| -rw-r--r-- | sys/i386/include/atomic.h | 10 |
2 files changed, 14 insertions, 6 deletions
diff --git a/sys/amd64/include/atomic.h b/sys/amd64/include/atomic.h index cb899a62d62f..17ef468c432a 100644 --- a/sys/amd64/include/atomic.h +++ b/sys/amd64/include/atomic.h @@ -75,15 +75,19 @@ void atomic_store_rel_##TYPE(volatile u_##TYPE *p, u_##TYPE v); #else /* !KLD_MODULE */ -#if defined(SMP) +/* + * For userland, assume the SMP case and use lock prefixes so that + * the binaries will run on both types of systems. + */ +#if defined(SMP) || !defined(_KERNEL) #if defined(LOCORE) #define MPLOCKED lock ; #else /* !LOCORE */ #define MPLOCKED "lock ; " #endif /* LOCORE */ -#else /* !SMP */ +#else /* SMP || !_KERNEL */ #define MPLOCKED -#endif /* SMP */ +#endif /* SMP || !_KERNEL */ #if !defined(LOCORE) /* diff --git a/sys/i386/include/atomic.h b/sys/i386/include/atomic.h index cb899a62d62f..17ef468c432a 100644 --- a/sys/i386/include/atomic.h +++ b/sys/i386/include/atomic.h @@ -75,15 +75,19 @@ void atomic_store_rel_##TYPE(volatile u_##TYPE *p, u_##TYPE v); #else /* !KLD_MODULE */ -#if defined(SMP) +/* + * For userland, assume the SMP case and use lock prefixes so that + * the binaries will run on both types of systems. + */ +#if defined(SMP) || !defined(_KERNEL) #if defined(LOCORE) #define MPLOCKED lock ; #else /* !LOCORE */ #define MPLOCKED "lock ; " #endif /* LOCORE */ -#else /* !SMP */ +#else /* SMP || !_KERNEL */ #define MPLOCKED -#endif /* SMP */ +#endif /* SMP || !_KERNEL */ #if !defined(LOCORE) /* |
