[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
- Re: [PATCH 06/14] i386/intel/pmap.c: move struct definitions to a header file, (continued)
- [PATCH 07/14] ipc/ipc_hash.c: move struct definition to a header file, Marin Ramesa, 2013/12/02
- [PATCH 08/14] ipc/ipc_marequest.c: move struct definition to a header file, Marin Ramesa, 2013/12/02
- [PATCH 09/14] ipc/ipc_port.c: trivial stylistic fix for consistency, Marin Ramesa, 2013/12/02
- [PATCH 10/14] kern/act.c: move struct definition to a header file, Marin Ramesa, 2013/12/02
- [PATCH 12/14] vm/memory_object_proxy.c: move struct definition to a header file, Marin Ramesa, 2013/12/02
- [PATCH 11/14] kern/lock.c: move struct definition to a header file,
Marin Ramesa <=
- [PATCH 13/14] vm/vm_fault.c: move struct definition to a header file, Marin Ramesa, 2013/12/02
- [PATCH 14/14] vm/vm_resident.c: move struct definition to a header file, Marin Ramesa, 2013/12/02
- Re: [PATCH 01/14] i386/i386at/kd.c: fix signed overflow (a warning from GCC), Samuel Thibault, 2013/12/08