Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys Make a slight rearrangement in how <machine/lock.h> is i...



details:   https://anonhg.NetBSD.org/src/rev/6498e24b8385
branches:  trunk
changeset: 474961:6498e24b8385
user:      thorpej <thorpej%NetBSD.org@localhost>
date:      Tue Jul 27 23:45:13 1999 +0000

description:
Make a slight rearrangement in how <machine/lock.h> is included.

diffstat:

 sys/arch/sparc/include/lock.h   |   4 ++--
 sys/arch/sparc64/include/lock.h |   4 ++--
 sys/sys/lock.h                  |  16 +++++++---------
 3 files changed, 11 insertions(+), 13 deletions(-)

diffs (77 lines):

diff -r 7ab38986f665 -r 6498e24b8385 sys/arch/sparc/include/lock.h
--- a/sys/arch/sparc/include/lock.h     Tue Jul 27 22:35:40 1999 +0000
+++ b/sys/arch/sparc/include/lock.h     Tue Jul 27 23:45:13 1999 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: lock.h,v 1.5 1999/07/27 22:22:33 thorpej Exp $ */
+/*     $NetBSD: lock.h,v 1.6 1999/07/27 23:45:14 thorpej Exp $ */
 
 /*-
  * Copyright (c) 1998, 1999 The NetBSD Foundation, Inc.
@@ -51,8 +51,8 @@
  * The value for SIMPLELOCK_LOCKED is what ldstub() naturally stores
  * `lock_data' given its address (and the fact that SPARC is big-endian).
  */
+#undef SIMPLELOCK_LOCKED
 #define        SIMPLELOCK_LOCKED       0xff000000
-#define        SIMPLELOCK_UNLOCKED     0
 
 static void    cpu_simple_lock_init __P((__volatile struct simplelock *));
 static void    cpu_simple_lock __P((__volatile struct simplelock *));
diff -r 7ab38986f665 -r 6498e24b8385 sys/arch/sparc64/include/lock.h
--- a/sys/arch/sparc64/include/lock.h   Tue Jul 27 22:35:40 1999 +0000
+++ b/sys/arch/sparc64/include/lock.h   Tue Jul 27 23:45:13 1999 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: lock.h,v 1.3 1999/07/27 22:22:34 thorpej Exp $ */
+/*     $NetBSD: lock.h,v 1.4 1999/07/27 23:45:14 thorpej Exp $ */
 
 /*-
  * Copyright (c) 1998, 1999 The NetBSD Foundation, Inc.
@@ -51,8 +51,8 @@
  * The value for SIMPLELOCK_LOCKED is what ldstub() naturally stores
  * `lock_data' given its address (and the fact that SPARC is big-endian).
  */
+#undef SIMPLELOCK_LOCKED
 #define        SIMPLELOCK_LOCKED       0xff000000
-#define        SIMPLELOCK_UNLOCKED     0
 
 static void    cpu_simple_lock_init __P((__volatile struct simplelock *));
 static void    cpu_simple_lock __P((__volatile struct simplelock *));
diff -r 7ab38986f665 -r 6498e24b8385 sys/sys/lock.h
--- a/sys/sys/lock.h    Tue Jul 27 22:35:40 1999 +0000
+++ b/sys/sys/lock.h    Tue Jul 27 23:45:13 1999 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: lock.h,v 1.20 1999/07/27 21:29:15 thorpej Exp $        */
+/*     $NetBSD: lock.h,v 1.21 1999/07/27 23:45:13 thorpej Exp $        */
 
 /*-
  * Copyright (c) 1999 The NetBSD Foundation, Inc.
@@ -89,10 +89,6 @@
 
 #include <sys/queue.h>
 
-#if defined(MULTIPROCESSOR)
-#include <machine/lock.h>
-#endif
-
 /*
  * The simple lock.  Provides a simple spinning mutex.  Note the
  * member which is used in atomic operations must be aligned in
@@ -110,12 +106,14 @@
 #endif
 };
 
-#ifndef SIMPLELOCK_LOCKED
+/*
+ * Machine-dependent code may #undef and override these.
+ */
 #define        SIMPLELOCK_LOCKED       1
-#endif
+#define        SIMPLELOCK_UNLOCKED     0
 
-#ifndef SIMPLELOCK_UNLOCKED
-#define        SIMPLELOCK_UNLOCKED     0
+#if defined(MULTIPROCESSOR)
+#include <machine/lock.h>
 #endif
 
 #ifdef LOCKDEBUG



Home | Main Index | Thread Index | Old Index