diff options
author | Justus Winter <4winter@informatik.uni-hamburg.de> | 2015-08-17 21:45:31 +0200 |
---|---|---|
committer | Justus Winter <4winter@informatik.uni-hamburg.de> | 2015-08-20 18:59:44 +0200 |
commit | e5e574f85db896e3352de43e3e2e321d62e2fdef (patch) | |
tree | 8c4c0a9de14480fcc57f30655e807dfc89dd1540 /ipc | |
parent | 156c7dd3bf3e3d1be41a992b61408cf1d82e95f1 (diff) |
ipc: use a general lock for the ipc_port_multiple lock
* ipc/ipc_port.c (ipc_port_multiple_lock_data): Use a general lock.
* ipc/ipc_port.h (ipc_port_multiple_lock_data): Likewise.
(ipc_port_multiple_{lock_init,lock,unlock}): Adapt accordingly.
Diffstat (limited to 'ipc')
-rw-r--r-- | ipc/ipc_port.c | 2 | ||||
-rw-r--r-- | ipc/ipc_port.h | 8 |
2 files changed, 5 insertions, 5 deletions
diff --git a/ipc/ipc_port.c b/ipc/ipc_port.c index 4e4ad59..bc9ea58 100644 --- a/ipc/ipc_port.c +++ b/ipc/ipc_port.c @@ -57,7 +57,7 @@ #endif /* MACH_KDB */ -decl_simple_lock_data(, ipc_port_multiple_lock_data) +struct lock ipc_port_multiple_lock_data; decl_simple_lock_data(, ipc_port_timestamp_lock_data) ipc_port_timestamp_t ipc_port_timestamp_data; diff --git a/ipc/ipc_port.h b/ipc/ipc_port.h index de43b42..97e6068 100644 --- a/ipc/ipc_port.h +++ b/ipc/ipc_port.h @@ -158,16 +158,16 @@ typedef struct ipc_port_request { * when it is taken. */ -decl_simple_lock_data(extern, ipc_port_multiple_lock_data) +extern struct lock ipc_port_multiple_lock_data; #define ipc_port_multiple_lock_init() \ - simple_lock_init(&ipc_port_multiple_lock_data) + lock_init(&ipc_port_multiple_lock_data, TRUE) #define ipc_port_multiple_lock() \ - simple_lock(&ipc_port_multiple_lock_data) + lock_write(&ipc_port_multiple_lock_data) #define ipc_port_multiple_unlock() \ - simple_unlock(&ipc_port_multiple_lock_data) + lock_write_done(&ipc_port_multiple_lock_data) /* * The port timestamp facility provides timestamps |