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); \
210 LWS_VISIBLE LWS_EXTERN
int
211 lws_dll2_is_detached(
const struct lws_dll2 *d);
217 lws_dll2_get_head(
struct lws_dll2_owner *owner) {
return owner->head; }
220 lws_dll2_get_tail(
struct lws_dll2_owner *owner) {
return owner->tail; }
222 LWS_VISIBLE LWS_EXTERN
void
225 LWS_VISIBLE LWS_EXTERN
void
228 LWS_VISIBLE LWS_EXTERN
void
229 lws_dll2_remove(
struct lws_dll2 *d);
231 typedef int (*lws_dll2_foreach_cb_t)(
struct lws_dll2 *d,
void *user);
233 LWS_VISIBLE LWS_EXTERN
int
235 lws_dll2_foreach_cb_t cb);
237 LWS_VISIBLE LWS_EXTERN
void
240 LWS_VISIBLE LWS_EXTERN
void
243 LWS_VISIBLE LWS_EXTERN
void
246 LWS_VISIBLE LWS_EXTERN
void
250 LWS_VISIBLE LWS_EXTERN
void
252 int (*compare3)(
void *priv,
const lws_dll2_t *d,
255 LWS_VISIBLE LWS_EXTERN
void *
256 _lws_dll2_search_sz_pl(
lws_dll2_owner_t *own,
const char *name,
size_t namelen,
257 size_t dll2_ofs,
size_t ptr_ofs);
265 #define lws_dll2_search_sz_pl(own, name, namelen, type, membd2list, membptr) \
266 ((type *)_lws_dll2_search_sz_pl(own, name, namelen, \
267 offsetof(type, membd2list), \
268 offsetof(type, membptr)))
272 lws_dll2_describe(
struct lws_dll2_owner *owner,
const char *desc);
274 #define lws_dll2_describe(x, y)
283 #define lws_start_foreach_dll_safe(___type, ___it, ___tmp, ___start) \
285 ___type ___it = ___start; \
287 ___type ___tmp = (___it)->next;
289 #define lws_end_foreach_dll_safe(___it, ___tmp) \
294 #define lws_start_foreach_dll(___type, ___it, ___start) \
296 ___type ___it = ___start; \
299 #define lws_end_foreach_dll(___it) \
300 ___it = (___it)->next; \
Definition: lws-dll2.h:203
Definition: lws-dll2.h:197