diff options
author | Eric Wong <e@80x24.org> | 2014-05-22 23:44:56 +0000 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2014-05-22 23:44:56 +0000 |
commit | 489e29e887f58eca37a5fefa205ff91a1c772f3c (patch) | |
tree | cf9ffade79bd2fd899153560896c92b61463ca24 /cmogstored.h | |
parent | 6189377b88318c5cc53bbfd0ec7983a0a396253b (diff) | |
download | cmogstored-489e29e887f58eca37a5fefa205ff91a1c772f3c.tar.gz |
ccan/list has branchless add/del operations and (IMHO) a better API.
Diffstat (limited to 'cmogstored.h')
-rw-r--r-- | cmogstored.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/cmogstored.h b/cmogstored.h index 1006fc3..1381f4f 100644 --- a/cmogstored.h +++ b/cmogstored.h @@ -47,8 +47,8 @@ #include <sched.h> #include <error.h> /* GNU */ #include <poll.h> -#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 */ |