diff options
author | Dmitry Kozlov <xeb@mail.ru> | 2014-06-03 21:43:27 +0400 |
---|---|---|
committer | Dmitry Kozlov <xeb@mail.ru> | 2014-06-03 21:43:27 +0400 |
commit | bd30f9451a3f775e7db30a9c405e4db9d4c259b8 (patch) | |
tree | 9700f1cc1c1a12c658e51176dd928a2a675d6a21 /accel-pppd/triton/mempool.c | |
parent | 093c53e3e08abb609cae6e58b1b438616c57c17f (diff) | |
download | accel-ppp-bd30f9451a3f775e7db30a9c405e4db9d4c259b8.tar.gz accel-ppp-bd30f9451a3f775e7db30a9c405e4db9d4c259b8.zip |
get out of SPINLOCK_INITIALIZER as it is not cross-platform compatible
Diffstat (limited to 'accel-pppd/triton/mempool.c')
-rw-r--r-- | accel-pppd/triton/mempool.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/accel-pppd/triton/mempool.c b/accel-pppd/triton/mempool.c index 1ee00f31..4a3ec8b0 100644 --- a/accel-pppd/triton/mempool.c +++ b/accel-pppd/triton/mempool.c @@ -53,8 +53,8 @@ struct _item_t }; static LIST_HEAD(pools); -static spinlock_t pools_lock = SPINLOCK_INITIALIZER; -static spinlock_t mmap_lock = SPINLOCK_INITIALIZER; +static spinlock_t pools_lock; +static spinlock_t mmap_lock; static void *mmap_ptr; static void *mmap_endptr; @@ -343,7 +343,10 @@ static void __init init(void) { sigset_t set; sigfillset(&set); - + + spinlock_init(&pools_lock); + spinlock_init(&mmap_lock); + struct sigaction sa = { .sa_handler = sigclean, .sa_mask = set, |