summaryrefslogtreecommitdiff
path: root/kern/processor.h
diff options
context:
space:
mode:
authorJustus Winter <4winter@informatik.uni-hamburg.de>2015-07-18 16:55:12 +0200
committerJustus Winter <4winter@informatik.uni-hamburg.de>2015-08-28 15:47:56 +0200
commit6218998e6c0392d988c86407380a841d90e874c8 (patch)
treeb201bd859632498252d9483df75575774bedc5fd /kern/processor.h
parent46d2c1dda2df8f185278aad63ea51f61336e8e7a (diff)
yyy more general locks, crashes, maybe b/c interrupt handler
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)