44 #define lws_start_foreach_ll(type, it, start)\
59 #define lws_end_foreach_ll(it, nxt) \
79 #define lws_start_foreach_ll_safe(type, it, start, nxt)\
83 type next_##it = it->nxt;
95 #define lws_end_foreach_ll_safe(it) \
116 #define lws_start_foreach_llp(type, it, start)\
118 type it = &(start); \
121 #define lws_start_foreach_llp_safe(type, it, start, nxt)\
123 type it = &(start); \
126 next = &((*(it))->nxt); \
138 #define lws_end_foreach_llp(it, nxt) \
139 it = &(*(it))->nxt; \
143 #define lws_end_foreach_llp_safe(it) \
148 #define lws_ll_fwd_insert(\
153 ___new_object->___m_list = ___list_head; \
154 ___list_head = ___new_object; \
157 #define lws_ll_fwd_remove(\
163 lws_start_foreach_llp(___type **, ___ppss, ___list_head) { \
164 if (*___ppss == ___target) { \
165 *___ppss = ___target->___m_list; \
168 } lws_end_foreach_llp(___ppss, ___m_list); \
255 int (*compare3)(
void *priv,
const lws_dll2_t *d,
260 size_t dll2_ofs,
size_t ptr_ofs);
268 #define lws_dll2_search_sz_pl(own, name, namelen, type, membd2list, membptr) \
269 ((type *)_lws_dll2_search_sz_pl(own, name, namelen, \
270 offsetof(type, membd2list), \
271 offsetof(type, membptr)))
277 #define lws_dll2_describe(x, y)
286 #define lws_start_foreach_dll_safe(___type, ___it, ___tmp, ___start) \
288 ___type ___it = ___start; \
290 ___type ___tmp = (___it)->next;
292 #define lws_end_foreach_dll_safe(___it, ___tmp) \
297 #define lws_start_foreach_dll(___type, ___it, ___start) \
299 ___type ___it = ___start; \
302 #define lws_end_foreach_dll(___it) \
303 ___it = (___it)->next; \
struct lws_dll2_owner * owner
struct lws_dll2 lws_dll2_t
LWS_VISIBLE LWS_EXTERN void lws_dll2_add_tail(struct lws_dll2 *d, struct lws_dll2_owner *owner)
LWS_VISIBLE LWS_EXTERN void lws_dll2_owner_clear(struct lws_dll2_owner *d)
LWS_VISIBLE LWS_EXTERN void lws_dll2_add_sorted_priv(lws_dll2_t *d, lws_dll2_owner_t *own, void *priv, int(*compare3)(void *priv, const lws_dll2_t *d, const lws_dll2_t *i))
#define lws_dll2_describe(x, y)
LWS_VISIBLE LWS_EXTERN void lws_dll2_add_sorted(lws_dll2_t *d, lws_dll2_owner_t *own, int(*compare)(const lws_dll2_t *d, const lws_dll2_t *i))
struct lws_dll2_owner lws_dll2_owner_t
LWS_VISIBLE LWS_EXTERN void lws_dll2_add_insert(struct lws_dll2 *d, struct lws_dll2 *prev)
LWS_VISIBLE LWS_EXTERN void lws_dll2_add_before(struct lws_dll2 *d, struct lws_dll2 *after)
int(* lws_dll2_foreach_cb_t)(struct lws_dll2 *d, void *user)
LWS_VISIBLE LWS_EXTERN int lws_dll2_is_detached(const struct lws_dll2 *d)
LWS_VISIBLE LWS_EXTERN void lws_dll2_remove(struct lws_dll2 *d)
LWS_VISIBLE LWS_EXTERN void lws_dll2_clear(struct lws_dll2 *d)
LWS_VISIBLE LWS_EXTERN void * _lws_dll2_search_sz_pl(lws_dll2_owner_t *own, const char *name, size_t namelen, size_t dll2_ofs, size_t ptr_ofs)
LWS_VISIBLE LWS_EXTERN int lws_dll2_foreach_safe(struct lws_dll2_owner *owner, void *user, lws_dll2_foreach_cb_t cb)
LWS_VISIBLE LWS_EXTERN void lws_dll2_add_head(struct lws_dll2 *d, struct lws_dll2_owner *owner)