summaryrefslogtreecommitdiff
path: root/sys/arch/i386/include
diff options
context:
space:
mode:
authorArtur Grabowski <art@cvs.openbsd.org>2007-05-04 12:58:42 +0000
committerArtur Grabowski <art@cvs.openbsd.org>2007-05-04 12:58:42 +0000
commit202dbd708c78383337cb4e23012236006ec5b3d4 (patch)
tree5dc18dd001985fe3a0f32b1b5ced9bc1febfa373 /sys/arch/i386/include
parent44edd472c011431a2138ccc1a14a6a7b7d8d53e5 (diff)
Implement rw_cas for i386.
It uses a function pointer to choose between the 386 and 486 versions. The 386 version is not MP safe, but we're not expecting MP support for 386 cpus. miod@ ok (and prodding)
Diffstat (limited to 'sys/arch/i386/include')
-rw-r--r--sys/arch/i386/include/lock.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/sys/arch/i386/include/lock.h b/sys/arch/i386/include/lock.h
index fe0578a3139..172ed35fdf3 100644
--- a/sys/arch/i386/include/lock.h
+++ b/sys/arch/i386/include/lock.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: lock.h,v 1.3 2006/03/13 18:42:16 mickey Exp $ */
+/* $OpenBSD: lock.h,v 1.4 2007/05/04 12:58:41 art Exp $ */
/* $NetBSD: lock.h,v 1.1.2.2 2000/05/03 14:40:55 sommerfeld Exp $ */
/*-
@@ -117,4 +117,9 @@ __cpu_simple_unlock(__cpu_simple_lock_t *lockp)
#endif /* !LOCKDEBUG */
+#ifdef _KERNEL
+extern int (*rw_cas_p)(volatile unsigned long *, unsigned long, unsigned long);
+#define rw_cas (*rw_cas_p)
+#endif
+
#endif /* _I386_LOCK_H_ */