diff options
author | Justus Winter <4winter@informatik.uni-hamburg.de> | 2015-08-20 11:43:56 +0200 |
---|---|---|
committer | Justus Winter <4winter@informatik.uni-hamburg.de> | 2015-08-20 18:59:44 +0200 |
commit | c098b6467ff5cfc25dd800d5bb2966f6ba3edff7 (patch) | |
tree | 2e41135fbbb846604fda18f3a8bf8dbcbe4ee8da /ipc | |
parent | e5e574f85db896e3352de43e3e2e321d62e2fdef (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')
-rw-r--r-- | ipc/ipc_mqueue.h | 10 |
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); |