summaryrefslogtreecommitdiff
path: root/accel-pppd/triton/mempool.c
diff options
context:
space:
mode:
authorDmitry Kozlov <xeb@mail.ru>2014-06-03 21:43:27 +0400
committerDmitry Kozlov <xeb@mail.ru>2014-06-03 21:43:27 +0400
commitbd30f9451a3f775e7db30a9c405e4db9d4c259b8 (patch)
tree9700f1cc1c1a12c658e51176dd928a2a675d6a21 /accel-pppd/triton/mempool.c
parent093c53e3e08abb609cae6e58b1b438616c57c17f (diff)
downloadaccel-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.c9
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,