From d9da5d41510e102983a51f9c9be08a80956b33e4 Mon Sep 17 00:00:00 2001 From: Justus Winter <4winter@informatik.uni-hamburg.de> Date: Sat, 25 Jul 2015 02:29:58 +0200 Subject: kern: use a general lock for the IPC structures * 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'. --- ipc/ipc_thread.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'ipc/ipc_thread.h') diff --git a/ipc/ipc_thread.h b/ipc/ipc_thread.h index 008ab4a..9e2c079 100644 --- a/ipc/ipc_thread.h +++ b/ipc/ipc_thread.h @@ -42,9 +42,9 @@ typedef thread_t ipc_thread_t; #define ITH_NULL THREAD_NULL -#define ith_lock_init(thread) simple_lock_init(&(thread)->ith_lock_data) -#define ith_lock(thread) simple_lock(&(thread)->ith_lock_data) -#define ith_unlock(thread) simple_unlock(&(thread)->ith_lock_data) +#define ith_lock_init(thread) lock_init(&(thread)->ith_lock_data, FALSE) +#define ith_lock(thread) lock_write(&(thread)->ith_lock_data) +#define ith_unlock(thread) lock_write_done(&(thread)->ith_lock_data) /* * Note that this isn't a queue, but rather a stack. This causes -- cgit v1.2.3