From 9cbef3531bcba56b05b275ebf4d4fe0f03f3e361 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') 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