bug-hurd
[Top][All Lists]
Advanced

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

[PATCH 11/14] kern/lock.c: move struct definition to a header file


From: Marin Ramesa
Subject: [PATCH 11/14] kern/lock.c: move struct definition to a header file
Date: Mon, 2 Dec 2013 22:54:49 +0100

* kern/lock.c [MACH_SLOCKS && NCPUS == 1] (simple_locks_info): Move struct 
definition to kern/lock.h.

---
 kern/lock.c | 5 -----
 kern/lock.h | 7 +++++++
 2 files changed, 7 insertions(+), 5 deletions(-)

diff --git a/kern/lock.c b/kern/lock.c
index fb5e344..ca47e8a 100644
--- a/kern/lock.c
+++ b/kern/lock.c
@@ -131,11 +131,6 @@ unsigned int simple_locks_taken = 0;
 
 #define        NSLINFO 1000            /* maximum number of locks held */
 
-struct simple_locks_info {
-       simple_lock_t l;
-       unsigned int ra;
-} simple_locks_info[NSLINFO];
-
 void check_simple_locks(void)
 {
        assert(simple_locks_taken == 0);
diff --git a/kern/lock.h b/kern/lock.h
index 4f38ea3..17bc330 100644
--- a/kern/lock.h
+++ b/kern/lock.h
@@ -152,6 +152,13 @@ struct lock {
 typedef struct lock    lock_data_t;
 typedef struct lock    *lock_t;
 
+#if    MACH_SLOCKS && NCPUS == 1
+struct simple_locks_info {
+       simple_lock_t l;
+       unsigned int ra;
+} simple_locks_info[NSLINFO];
+#endif /* MACH_SLOCKS && NCPUS == 1 */
+
 /* Sleep locks must work even if no multiprocessing */
 
 extern void            lock_init(lock_t, boolean_t);
-- 
1.8.1.4




reply via email to

[Prev in Thread] Current Thread [Next in Thread]