summaryrefslogtreecommitdiff
path: root/ipc/ipc_thread.h
diff options
context:
space:
mode:
authorJustus Winter <4winter@informatik.uni-hamburg.de>2015-07-25 02:29:58 +0200
committerJustus Winter <4winter@informatik.uni-hamburg.de>2015-08-28 15:47:56 +0200
commitd9da5d41510e102983a51f9c9be08a80956b33e4 (patch)
treeedabf0e3c2837e1a3a7436a0f8aae138cd1c761e /ipc/ipc_thread.h
parent4b5f47f01217c20c4213660567f6c28dec4554cf (diff)
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'.
Diffstat (limited to 'ipc/ipc_thread.h')
-rw-r--r--ipc/ipc_thread.h6
1 files changed, 3 insertions, 3 deletions
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