From 489e29e887f58eca37a5fefa205ff91a1c772f3c Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Thu, 22 May 2014 23:44:56 +0000 Subject: trade sys/queue.h LIST_* for ccan/list ccan/list has branchless add/del operations and (IMHO) a better API. --- cmogstored.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'cmogstored.h') diff --git a/cmogstored.h b/cmogstored.h index 1006fc3..1381f4f 100644 --- a/cmogstored.h +++ b/cmogstored.h @@ -47,8 +47,8 @@ #include #include /* GNU */ #include -#include "bsd/queue_safe.h" #include "bsd/simpleq.h" +#include "ccan/list/list.h" /* gnulib headers */ #include "progname.h" @@ -147,7 +147,7 @@ struct mog_mgmt { struct mog_svc *svc; enum Gc_hash alg; enum mog_mgmt_method mgmt_method; - LIST_ENTRY(mog_mgmt) subscribed; + struct list_node subscribed; }; struct mog_queue; @@ -168,7 +168,7 @@ struct mog_svc { Hash_table *by_st_dev; pthread_mutex_t devstats_lock; struct mog_queue *queue; - LIST_HEAD(mgmt_head, mog_mgmt) devstats_subscribers; + struct list_head devstats_subscribers; SIMPLEQ_ENTRY(mog_svc) qentry; mode_t put_perms; mode_t mkcol_perms; @@ -248,7 +248,7 @@ struct mog_fd; struct mog_queue { int queue_fd; /* epoll or kqueue */ struct mog_thrpool thrpool; - LIST_ENTRY(mog_queue) qbuddies; + struct list_node qbuddies; }; /* accept.c */ -- cgit v1.2.3-24-ge0c7