summaryrefslogtreecommitdiff
path: root/ipc/ipc_mqueue.h
diff options
context:
space:
mode:
authorJustus Winter <4winter@informatik.uni-hamburg.de>2015-08-20 11:43:56 +0200
committerJustus Winter <4winter@informatik.uni-hamburg.de>2015-08-28 15:47:56 +0200
commit47c58daea504518847167900de3243264054ba0a (patch)
treea2c50a8f9e687d54bb42584ed7bd80947c6c6d29 /ipc/ipc_mqueue.h
parente56c18dce6223bf3c9495830fe010f2cd9d3be0a (diff)
ipc/ipc_mqueue: use a general lock
* ipc/ipc_mqueue.h (struct ipc_mqueue): Use a general lock. Adapt macros.
Diffstat (limited to 'ipc/ipc_mqueue.h')
-rw-r--r--ipc/ipc_mqueue.h10
1 files changed, 5 insertions, 5 deletions
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 <ipc/ipc_thread.h>
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);