diff options
author | Justus Winter <4winter@informatik.uni-hamburg.de> | 2015-07-25 02:29:58 +0200 |
---|---|---|
committer | Justus Winter <4winter@informatik.uni-hamburg.de> | 2015-07-26 12:14:18 +0200 |
commit | 75e6b9de564382ce5e4d4f2092635ccded70a14c (patch) | |
tree | 122a2f7896953c109a299604bcbf77dbb48f9225 /kern/task.h | |
parent | 6a398d74566752f0904c05ea4690427c8cecf1b5 (diff) |
kern: use a general lock for the IPC structuresfix-ipc-space-locking-2015-07-27
* ipc/ipc_thread.h (ith_{lock_init,lock,unlock}): Use a general lock.
* kern/task.h (struct task): Use a general lock for `itk_lock_data'.
(itk_{lock_init,lock,unlock}): Use a general lock.
* kern/thread.h (struct thread): Use a general lock for `ith_lock_data'.
Diffstat (limited to 'kern/task.h')
-rw-r--r-- | kern/task.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/kern/task.h b/kern/task.h index 2a4c28f..93087ff 100644 --- a/kern/task.h +++ b/kern/task.h @@ -89,7 +89,7 @@ struct task { time_value_t creation_time; /* time stamp at creation */ /* IPC structures */ - decl_simple_lock_data(, itk_lock_data) + struct lock itk_lock_data; struct ipc_port *itk_self; /* not a right, doesn't hold ref */ struct ipc_port *itk_sself; /* a send right */ struct ipc_port *itk_exception; /* a send right */ @@ -128,9 +128,9 @@ struct task { #define task_lock(task) simple_lock(&(task)->lock) #define task_unlock(task) simple_unlock(&(task)->lock) -#define itk_lock_init(task) simple_lock_init(&(task)->itk_lock_data) -#define itk_lock(task) simple_lock(&(task)->itk_lock_data) -#define itk_unlock(task) simple_unlock(&(task)->itk_lock_data) +#define itk_lock_init(task) lock_init(&(task)->itk_lock_data, FALSE) +#define itk_lock(task) lock_write(&(task)->itk_lock_data) +#define itk_unlock(task) lock_write_done(&(task)->itk_lock_data) /* * Exported routines/macros |