summaryrefslogtreecommitdiff
path: root/kern/processor.h
diff options
context:
space:
mode:
Diffstat (limited to 'kern/processor.h')
-rw-r--r--kern/processor.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/kern/processor.h b/kern/processor.h
index b81526c..69ddf87 100644
--- a/kern/processor.h
+++ b/kern/processor.h
@@ -68,7 +68,7 @@ struct processor_set {
decl_simple_lock_data(, ref_lock) /* lock for ref count */
queue_chain_t all_psets; /* link for all_psets */
boolean_t active; /* is pset in use */
- decl_simple_lock_data(, lock) /* lock for everything else */
+ struct lock lock; /* lock for everything else */
struct ipc_port * pset_self; /* port for operations */
struct ipc_port * pset_name_self; /* port for information */
int max_priority; /* maximum priority */
@@ -216,8 +216,9 @@ extern processor_t processor_ptr[NCPUS];
/* Useful lock macros */
-#define pset_lock(pset) simple_lock(&(pset)->lock)
-#define pset_unlock(pset) simple_unlock(&(pset)->lock)
+#define pset_lock_init(pset) lock_init(&(pset)->lock, FALSE)
+#define pset_lock(pset) lock_write(&(pset)->lock)
+#define pset_unlock(pset) lock_write_done(&(pset)->lock)
#define pset_ref_lock(pset) simple_lock(&(pset)->ref_lock)
#define pset_ref_unlock(pset) simple_unlock(&(pset)->ref_lock)