From 47c58daea504518847167900de3243264054ba0a Mon Sep 17 00:00:00 2001 From: Justus Winter <4winter@informatik.uni-hamburg.de> Date: Thu, 20 Aug 2015 11:43:56 +0200 Subject: ipc/ipc_mqueue: use a general lock * ipc/ipc_mqueue.h (struct ipc_mqueue): Use a general lock. Adapt macros. --- ipc/ipc_mqueue.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'ipc/ipc_mqueue.h') diff --git a/ipc/ipc_mqueue.h b/ipc/ipc_mqueue.h index 2af5e02..e7d5670 100644 --- a/ipc/ipc_mqueue.h +++ b/ipc/ipc_mqueue.h @@ -43,17 +43,17 @@ #include typedef struct ipc_mqueue { - decl_simple_lock_data(, imq_lock_data) + struct lock imq_lock_data; struct ipc_kmsg_queue imq_messages; struct ipc_thread_queue imq_threads; } *ipc_mqueue_t; #define IMQ_NULL ((ipc_mqueue_t) 0) -#define imq_lock_init(mq) simple_lock_init(&(mq)->imq_lock_data) -#define imq_lock(mq) simple_lock(&(mq)->imq_lock_data) -#define imq_lock_try(mq) simple_lock_try(&(mq)->imq_lock_data) -#define imq_unlock(mq) simple_unlock(&(mq)->imq_lock_data) +#define imq_lock_init(mq) lock_init(&(mq)->imq_lock_data, FALSE) +#define imq_lock(mq) lock_write(&(mq)->imq_lock_data) +#define imq_lock_try(mq) lock_try_write(&(mq)->imq_lock_data) +#define imq_unlock(mq) lock_write_done(&(mq)->imq_lock_data) extern void ipc_mqueue_init(ipc_mqueue_t); -- cgit v1.2.3