Allow atomic ops to be somewhat safely used in userland. We always use
lock prefixes in the userland case so that the binaries will work on both SMP and UP systems.
This commit is contained in:
parent
275d9b59d3
commit
2a89a48fbd
@ -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)
|
||||
/*
|
||||
|
@ -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)
|
||||
/*
|
||||
|
Loading…
x
Reference in New Issue
Block a user