summaryrefslogtreecommitdiffstats
path: root/sys/i386/include/cpufunc.h
diff options
context:
space:
mode:
authorjdp <jdp@FreeBSD.org>1997-05-21 22:56:05 +0000
committerjdp <jdp@FreeBSD.org>1997-05-21 22:56:05 +0000
commit0d42d75ea0fce2ae31edec2f6417be2847d8ff21 (patch)
treeeb0ca9cc1375257b00f5cefaeea4851e19e1cbb9 /sys/i386/include/cpufunc.h
parentad7a8a1b0301149732c06340646840e9076fcd7c (diff)
downloadFreeBSD-src-0d42d75ea0fce2ae31edec2f6417be2847d8ff21.zip
FreeBSD-src-0d42d75ea0fce2ae31edec2f6417be2847d8ff21.tar.gz
Make setbits() SMP-safe. Eliminate the SETBITS() macro, and replace
all uses of it with the equivalent calls to setbits(). This change incidentally eliminates a problem building ELF kernels that was caused by SETBITS. Reviewed by: fsmp, peter Submitted by: bde
Diffstat (limited to 'sys/i386/include/cpufunc.h')
-rw-r--r--sys/i386/include/cpufunc.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/sys/i386/include/cpufunc.h b/sys/i386/include/cpufunc.h
index be861b2..6db8855 100644
--- a/sys/i386/include/cpufunc.h
+++ b/sys/i386/include/cpufunc.h
@@ -30,7 +30,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: cpufunc.h,v 1.65 1997/04/28 00:24:59 fsmp Exp $
+ * $Id: cpufunc.h,v 1.66 1997/05/07 19:51:59 peter Exp $
*/
/*
@@ -356,7 +356,11 @@ rdtsc(void)
static __inline void
setbits(volatile unsigned *addr, u_int bits)
{
- __asm __volatile("orl %1,%0" : "=m" (*addr) : "ir" (bits));
+ __asm __volatile(
+#ifdef SMP
+ "lock; "
+#endif
+ "orl %1,%0" : "=m" (*addr) : "ir" (bits));
}
static __inline void
OpenPOWER on IntegriCloud