summaryrefslogtreecommitdiff
path: root/src/ipcpd/timerwheel.c
diff options
context:
space:
mode:
authorSander Vrijders <sander.vrijders@intec.ugent.be>2017-01-09 16:40:40 +0100
committerSander Vrijders <sander.vrijders@intec.ugent.be>2017-01-09 16:40:40 +0100
commit6c1cfb990f56b2fa87500732cb4f0966616907c7 (patch)
tree4af3a0e2ce9fc12d7dc759803da70b7f570d6f8a /src/ipcpd/timerwheel.c
parente56d24010287127fc6b9c9da8d1f7cf160c50253 (diff)
parent5273b0f5915956e49bcad4167cca2c1349e8816d (diff)
downloadouroboros-6c1cfb990f56b2fa87500732cb4f0966616907c7.tar.gz
ouroboros-6c1cfb990f56b2fa87500732cb4f0966616907c7.zip
Merged in dstaesse/ouroboros/be-list (pull request #340)
Updates to list and fixes LGPL license for library
Diffstat (limited to 'src/ipcpd/timerwheel.c')
-rw-r--r--src/ipcpd/timerwheel.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/ipcpd/timerwheel.c b/src/ipcpd/timerwheel.c
index 4ef7ce2f..bb61bd91 100644
--- a/src/ipcpd/timerwheel.c
+++ b/src/ipcpd/timerwheel.c
@@ -1,5 +1,5 @@
/*
- * Ouroboros - Copyright (C) 2016
+ * Ouroboros - Copyright (C) 2016 - 2017
*
* Timerwheel
*
@@ -232,7 +232,7 @@ struct timerwheel * timerwheel_create(unsigned int resolution,
tw->intv.tv_sec = (tw->resolution / FRAC) / 1000;
tw->intv.tv_nsec = ((tw->resolution / FRAC) % 1000) * MILLION;
- INIT_LIST_HEAD(&tw->wq);
+ list_head_init(&tw->wq);
if (pthread_mutex_init(&tw->lock, NULL)) {
LOG_DBG("Could not init mutex.");
@@ -265,7 +265,7 @@ struct timerwheel * timerwheel_create(unsigned int resolution,
now.tv_nsec -= (now.tv_nsec % MILLION);
for (i = 0; i < tw->elements; ++i) {
- INIT_LIST_HEAD(&tw->wheel[i].funcs);
+ list_head_init(&tw->wheel[i].funcs);
tw->wheel[i].expiry = now;
ts_add(&now, &res_ts, &now);
}