From 6218998e6c0392d988c86407380a841d90e874c8 Mon Sep 17 00:00:00 2001 From: Justus Winter <4winter@informatik.uni-hamburg.de> Date: Sat, 18 Jul 2015 16:55:12 +0200 Subject: yyy more general locks, crashes, maybe b/c interrupt handler --- kern/processor.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'kern/processor.h') 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) -- cgit v1.2.3