/freebsd/usr.sbin/ppp/ |
H A D | iplist.c | 56 iplist_first(struct iplist *list) in iplist_first() argument 58 list->cur.pos = -1; in iplist_first() 62 iplist_setrange(struct iplist *list, char *range) in iplist_setrange() argument 67 if (!inet_aton(range, &list->cur.ip)) in iplist_setrange() 69 list->cur.lstart = ntohl(list->cur.ip.s_addr); in iplist_setrange() 70 list->cur.nItems = 1; in iplist_setrange() 72 if (!do_inet_aton(range, ptr, &list->cur.ip)) in iplist_setrange() 75 list->cur.lstart = ntohl(list->cur.ip.s_addr); in iplist_setrange() 76 list->cur.nItems = 1; in iplist_setrange() 87 list->cur.lstart = ntohl(list->cur.ip.s_addr); in iplist_setrange() [all …]
|
/freebsd/sys/dev/ocs_fc/ |
H A D | ocs_list.h | 49 #define ocs_list_set_list_magic list->magic = OCS_LIST_LIST_MAGIC 50 #define ocs_list_set_link_magic list->magic = OCS_LIST_LINK_MAGIC 83 #define item2link(list, item) ((ocs_list_t*) (((uint8_t*)(item)) + (list)->offset)) argument 86 #define link2item(list, link) ((void*) (((uint8_t*)(link)) - (list)->offset)) argument 100 _ocs_list_init(ocs_list_t *list, uint32_t offset) in _ocs_list_init() argument 102 ocs_list_assert(list); in _ocs_list_init() 105 list->next = list; in _ocs_list_init() 106 list->prev = list; in _ocs_list_init() 107 list->offset = offset; in _ocs_list_init() 120 ocs_list_empty(ocs_list_t *list) in ocs_list_empty() argument [all …]
|
/freebsd/sys/kern/ |
H A D | subr_eventhandler.c | 70 struct eventhandler_list *list, *new_list; in eventhandler_find_or_create_list() local 73 list = _eventhandler_find_list(name); in eventhandler_find_or_create_list() 76 if (list == NULL) { in eventhandler_find_or_create_list() 84 list = _eventhandler_find_list(name); in eventhandler_find_or_create_list() 85 if (list != NULL) { in eventhandler_find_or_create_list() 89 list = new_list; in eventhandler_find_or_create_list() 90 TAILQ_INIT(&list->el_entries); in eventhandler_find_or_create_list() 91 list->el_name = (char *)(list + 1); in eventhandler_find_or_create_list() 92 strcpy(list->el_name, name); in eventhandler_find_or_create_list() 93 mtx_init(&list->el_lock, list->el_name, "eventhandler list", in eventhandler_find_or_create_list() [all …]
|
/freebsd/sys/contrib/openzfs/include/os/linux/spl/sys/ |
H A D | list.h | 50 typedef struct list { struct 59 list_is_empty(list_t *list) in list_is_empty() argument 61 return (list_empty(&list->list_head)); in list_is_empty() 72 list_create(list_t *list, size_t size, size_t offset) in list_create() argument 76 list->list_offset = offset; in list_create() 77 INIT_LIST_HEAD(&list->list_head); in list_create() 81 list_destroy(list_t *list) in list_destroy() argument 83 list_del(&list->list_head); in list_destroy() 87 list_insert_head(list_t *list, void *object) in list_insert_head() argument 89 list_add(list_d2l(list, object), &list->list_head); in list_insert_head() [all …]
|
/freebsd/sys/contrib/openzfs/lib/libspl/ |
H A D | list.c | 40 #define list_insert_after_node(list, node, object) { \ argument 41 list_node_t *lnew = list_d2l(list, object); \ 48 #define list_insert_before_node(list, node, object) { \ argument 49 list_node_t *lnew = list_d2l(list, object); \ 62 list_create(list_t *list, size_t size, size_t offset) in list_create() argument 64 ASSERT(list); in list_create() 70 list->list_offset = offset; in list_create() 71 list->list_head.next = list->list_head.prev = &list->list_head; in list_create() 75 list_destroy(list_t *list) in list_destroy() argument 77 list_node_t *node = &list->list_head; in list_destroy() [all …]
|
/freebsd/sys/contrib/openzfs/module/os/freebsd/spl/ |
H A D | list.c | 40 #define list_insert_after_node(list, node, object) { \ argument 41 list_node_t *lnew = list_d2l(list, object); \ 48 #define list_insert_before_node(list, node, object) { \ argument 49 list_node_t *lnew = list_d2l(list, object); \ 62 list_create(list_t *list, size_t size, size_t offset) in list_create() argument 64 ASSERT3P(list, !=, NULL); in list_create() 69 list->list_offset = offset; in list_create() 70 list->list_head.list_next = list->list_head.list_prev = in list_create() 71 &list->list_head; in list_create() 75 list_destroy(list_t *list) in list_destroy() argument [all …]
|
/freebsd/contrib/ntp/libntp/lib/isc/include/isc/ |
H A D | list.h | 32 #define ISC_LIST_INIT(list) \ argument 33 do { (list).head = NULL; (list).tail = NULL; } while (0) 45 #define ISC_LIST_HEAD(list) ((list).head) argument 46 #define ISC_LIST_TAIL(list) ((list).tail) argument 47 #define ISC_LIST_EMPTY(list) ISC_TF((list).head == NULL) argument 49 #define __ISC_LIST_PREPENDUNSAFE(list, elt, link) \ argument 51 if ((list).head != NULL) \ 52 (list).head->link.prev = (elt); \ 54 (list).tail = (elt); \ 56 (elt)->link.next = (list).head; \ [all …]
|
/freebsd/contrib/elftoolchain/ar/ |
H A D | acpyacc.y | 52 struct list { struct 54 struct list *next; argument 62 static void arscp_addlib(char *archive, struct list *list); 63 static void arscp_addmod(struct list *list); 66 static void arscp_delete(struct list *list); 67 static void arscp_dir(char *archive, struct list *list, char *rlt); 69 static void arscp_extract(struct list *list); 71 static void arscp_free_mlist(struct list *list); 73 static struct list *arscp_mlist(struct list *list, char *str); 74 static void arscp_mlist2argv(struct list *list); [all …]
|
/freebsd/usr.bin/ar/ |
H A D | acpyacc.y | 49 struct list { struct 51 struct list *next; argument 58 static void arscp_addlib(char *archive, struct list *list); 59 static void arscp_addmod(struct list *list); 63 static void arscp_delete(struct list *list); 64 static void arscp_dir(char *archive, struct list *list, char *rlt); 66 static void arscp_extract(struct list *list); 68 static void arscp_free_mlist(struct list *list); 70 static struct list *arscp_mlist(struct list *list, char *str); 71 static void arscp_mlist2argv(struct list *list); [all …]
|
/freebsd/sys/dev/qat/qat_api/common/ctrl/ |
H A D | sal_list.c | 17 SalList_add(sal_list_t **list, sal_list_t **tail, void *pObj) in SalList_add() argument 21 if (NULL == *list) { in SalList_add() 23 *list = malloc(sizeof(sal_list_t), M_QAT, M_WAITOK); in SalList_add() 24 (*list)->next = NULL; in SalList_add() 25 (*list)->pObj = pObj; in SalList_add() 26 *tail = *list; in SalList_add() 42 SalList_getObject(sal_list_t *list) in SalList_getObject() argument 44 if (list == NULL) { in SalList_getObject() 48 return list->pObj; in SalList_getObject() 52 SalList_delObject(sal_list_t **list) in SalList_delObject() argument [all …]
|
/freebsd/contrib/wpa/src/utils/ |
H A D | list.h | 22 static inline void dl_list_init(struct dl_list *list) in dl_list_init() argument 24 list->next = list; in dl_list_init() 25 list->prev = list; in dl_list_init() 28 static inline void dl_list_add(struct dl_list *list, struct dl_list *item) in dl_list_add() argument 30 item->next = list->next; in dl_list_add() 31 item->prev = list; in dl_list_add() 32 list->next->prev = item; in dl_list_add() 33 list->next = item; in dl_list_add() 36 static inline void dl_list_add_tail(struct dl_list *list, struct dl_list *item) in dl_list_add_tail() argument 38 dl_list_add(list->prev, item); in dl_list_add_tail() [all …]
|
/freebsd/contrib/atf/atf-c/detail/ |
H A D | list_test.c | 51 atf_list_t list; in ATF_TC_BODY() local 53 RE(atf_list_init(&list)); in ATF_TC_BODY() 54 ATF_REQUIRE_EQ(atf_list_size(&list), 0); in ATF_TC_BODY() 55 atf_list_fini(&list); in ATF_TC_BODY() 69 atf_list_t list; in ATF_TC_BODY() local 74 RE(atf_list_init(&list)); in ATF_TC_BODY() 75 RE(atf_list_append(&list, &i1, false)); in ATF_TC_BODY() 76 RE(atf_list_append(&list, &i2, false)); in ATF_TC_BODY() 77 RE(atf_list_append(&list, &i3, false)); in ATF_TC_BODY() 79 ATF_CHECK_EQ(*(int *)atf_list_index(&list, 0), 1); in ATF_TC_BODY() [all …]
|
/freebsd/sys/cam/ctl/ |
H A D | ctl_tpc.c | 90 struct tpc_list *list; member 161 struct tpc_list *list, *tlist; in tpc_timeout() local 166 TAILQ_FOREACH_SAFE(list, &lun->tpc_lists, links, tlist) { in tpc_timeout() 167 if (!list->completed || time_uptime < list->last_active + in tpc_timeout() 170 TAILQ_REMOVE(&lun->tpc_lists, list, links); in tpc_timeout() 171 free(list, M_CTL); in tpc_timeout() 229 struct tpc_list *list, *tlist; in ctl_tpc_lun_clear() local 231 TAILQ_FOREACH_SAFE(list, &lun->tpc_lists, links, tlist) { in ctl_tpc_lun_clear() 232 if (initidx != -1 && list->init_idx != initidx) in ctl_tpc_lun_clear() 234 if (!list->completed) in ctl_tpc_lun_clear() [all …]
|
/freebsd/contrib/libucl/uthash/ |
H A D | utlist.h | 84 #define _SV(elt,list) _tmp = (char*)(list); {char **_alias = (char**)&(list); *_alias = (elt); } argument 85 #define _NEXT(elt,list,next) ((char*)((list)->next)) argument 86 #define _NEXTASGN(elt,list,to,next) { char **_alias = (char**)&((list)->next); *_alias=(char*)(to);… argument 88 #define _PREVASGN(elt,list,to,prev) { char **_alias = (char**)&((list)->prev); *_alias=(char*)(to);… argument 89 #define _RS(list) { char **_alias = (char**)&(list); *_alias=_tmp; } argument 92 #define _SV(elt,list) argument 93 #define _NEXT(elt,list,next) ((elt)->next) argument 94 #define _NEXTASGN(elt,list,to,next) ((elt)->next)=(to) argument 96 #define _PREVASGN(elt,list,to,prev) ((elt)->prev)=(to) argument 97 #define _RS(list) argument [all …]
|
/freebsd/lib/libc/include/isc/ |
H A D | list.h | 31 #define INIT_LIST(list) \ argument 32 do { (list).head = NULL; (list).tail = NULL; } while (0) 45 #define HEAD(list) ((list).head) argument 46 #define TAIL(list) ((list).tail) argument 47 #define EMPTY(list) ((list).head == NULL) argument 49 #define PREPEND(list, elt, link) \ argument 52 if ((list).head != NULL) \ 53 (list).head->link.prev = (elt); \ 55 (list).tail = (elt); \ 57 (elt)->link.next = (list).head; \ [all …]
|
/freebsd/cddl/contrib/opensolaris/tools/ctf/common/ |
H A D | list.c | 40 struct list { struct 42 struct list *l_next; argument 47 list_add(list_t **list, void *data) in list_add() argument 53 le->l_next = *list; in list_add() 54 *list = le; in list_add() 59 slist_add(list_t **list, void *data, int (*cmp)(void *, void *)) in slist_add() argument 63 for (nextp = list; *nextp; nextp = &((*nextp)->l_next)) { in slist_add() 79 list_remove(list_t **list, void *data, int (*cmp)(void *, void *, void *), in list_remove() argument 88 for (le = *list, le2 = list; le; le2 = &le->l_next, le = le->l_next) { in list_remove() 101 list_free(list_t *list, void (*datafree)(void *, void *), void *private) in list_free() argument [all …]
|
/freebsd/contrib/dialog/ |
H A D | dialog.pl | 230 my ( $i, $tmp, $ent, $height, $listheight, $menuheight, @list ); 240 @list = (); 243 $list[@list] = "ed($ent); 245 $list[@list] = "ed($ent); 265 . " $height $width $menuheight @list" ); 270 my ( $i, $tmp, $ent, $height, $listheight, $menuheight, @list ); 280 @list = (); 283 $list[@list] = "ed($ent); 284 $list[@list] = "ed(""); 304 . " $height $width $menuheight @list" ); [all …]
|
H A D | fselect.c | 90 init_list(LIST * list, WINDOW *par, WINDOW *win, int mousex) in init_list() argument 92 list->par = par; in init_list() 93 list->win = win; in init_list() 94 list->length = 0; in init_list() 95 list->offset = 0; in init_list() 96 list->choice = 0; in init_list() 97 list->mousex = mousex; in init_list() 98 list->allocd = 0; in init_list() 99 list->data = 0; in init_list() 117 data_of(LIST * list) in data_of() argument [all …]
|
/freebsd/contrib/processor-trace/libipt/src/ |
H A D | pt_image.c | 64 struct pt_section_list *list; in pt_mk_section_list() local 67 list = malloc(sizeof(*list)); in pt_mk_section_list() 68 if (!list) in pt_mk_section_list() 71 memset(list, 0, sizeof(*list)); in pt_mk_section_list() 77 pt_msec_init(&list->section, section, asid, vaddr, offset, size); in pt_mk_section_list() 78 list->isid = isid; in pt_mk_section_list() 80 return list; in pt_mk_section_list() 83 free(list); in pt_mk_section_list() 87 static void pt_section_list_free(struct pt_section_list *list) in pt_section_list_free() argument 89 if (!list) in pt_section_list_free() [all …]
|
/freebsd/sys/contrib/openzfs/module/zfs/ |
H A D | objlist.c | 25 objlist_t *list = kmem_alloc(sizeof (*list), KM_SLEEP); in objlist_create() local 26 list_create(&list->ol_list, sizeof (objlist_node_t), in objlist_create() 28 list->ol_last_lookup = 0; in objlist_create() 29 return (list); in objlist_create() 33 objlist_destroy(objlist_t *list) in objlist_destroy() argument 35 for (objlist_node_t *n = list_remove_head(&list->ol_list); in objlist_destroy() 36 n != NULL; n = list_remove_head(&list->ol_list)) { in objlist_destroy() 39 list_destroy(&list->ol_list); in objlist_destroy() 40 kmem_free(list, sizeof (*list)); in objlist_destroy() 52 objlist_exists(objlist_t *list, uint64_t object) in objlist_exists() argument [all …]
|
/freebsd/contrib/wireguard-tools/ |
H A D | ipc.c | 18 static int string_list_add(struct string_list *list, const char *str) in string_list_add() argument 25 if (len >= list->cap - list->len) { in string_list_add() 27 size_t new_cap = list->cap * 2; in string_list_add() 29 if (new_cap < list->len + len + 1) in string_list_add() 30 new_cap = list->len + len + 1; in string_list_add() 31 new_buffer = realloc(list->buffer, new_cap); in string_list_add() 34 list->buffer = new_buffer; in string_list_add() 35 list->cap = new_cap; in string_list_add() 37 memcpy(list->buffer + list->len, str, len); in string_list_add() 38 list->len += len; in string_list_add() [all …]
|
/freebsd/contrib/bmake/ |
H A D | lst.c | 14 * notice, this list of conditions and the following disclaimer. 16 * notice, this list of conditions and the following disclaimer in the 52 Lst_Done(List *list) in Lst_Done() argument 56 for (ln = list->first; ln != NULL; ln = next) { in Lst_Done() 63 Lst_DoneFree(List *list) in Lst_DoneCall() argument 67 for (ln = list->first; ln != NULL; ln = next) { in Lst_DoneCall() 76 Lst_InsertBefore(List *list, ListNode *ln, void *datum) in Lst_InsertBefore() argument 88 if (ln == list->first) in Lst_InsertBefore() 89 list->first = newNode; in Lst_InsertBefore() 92 /* Add a piece of data at the start of the given list 94 Lst_Prepend(List * list,void * datum) Lst_Prepend() argument 113 Lst_Append(List * list,void * datum) Lst_Append() argument 135 Lst_Remove(List * list,ListNode * ln) Lst_Remove() argument 177 Lst_FindDatum(List * list,const void * datum) Lst_FindDatum() argument 234 Lst_Dequeue(List * list) Lst_Dequeue() argument [all...] |
/freebsd/sys/dev/drm2/ttm/ |
H A D | ttm_execbuf_util.c | 34 static void ttm_eu_backoff_reservation_locked(struct list_head *list) in ttm_eu_backoff_reservation_locked() argument 38 list_for_each_entry(entry, list, head) { in ttm_eu_backoff_reservation_locked() 54 static void ttm_eu_del_from_lru_locked(struct list_head *list) in ttm_eu_del_from_lru_locked() argument 58 list_for_each_entry(entry, list, head) { in ttm_eu_del_from_lru_locked() 70 static void ttm_eu_list_ref_sub(struct list_head *list) in ttm_eu_list_ref_sub() argument 74 list_for_each_entry(entry, list, head) { in ttm_eu_list_ref_sub() 84 void ttm_eu_backoff_reservation(struct list_head *list) in ttm_eu_backoff_reservation() argument 89 if (list_empty(list)) in ttm_eu_backoff_reservation() 92 entry = list_first_entry(list, struct ttm_validate_buffer, head); in ttm_eu_backoff_reservation() 95 ttm_eu_backoff_reservation_locked(list); in ttm_eu_backoff_reservation() [all …]
|
/freebsd/contrib/less/ |
H A D | lglob.h | 26 #define DECL_GLOB_LIST(list) char **list; char **pp; argument 27 #define GLOB_LIST(filename,list) list = _fnexplode(filename) argument 28 #define GLOB_LIST_FAILED(list) list == NULL argument 29 #define SCAN_GLOB_LIST(list,p) pp = list; *pp != NULL; pp++ argument 30 #define INIT_GLOB_LIST(list,p) p = *pp argument 31 #define GLOB_LIST_DONE(list) _fnexplodefree(list) argument 36 #define DECL_GLOB_LIST(list) glob_t list; int i; argument 37 #define GLOB_LIST(filename,list) glob(filename,GLOB_NOCHECK,0,&list) argument 38 #define GLOB_LIST_FAILED(list) 0 argument 39 #define SCAN_GLOB_LIST(list,p) i = 0; i < list.gl_pathc; i++ argument [all …]
|
/freebsd/sys/dev/hptrr/ |
H A D | hptrr_os_bsd.c | 123 void freelist_reserve(struct freelist *list, void *osext, HPT_UINT size, HPT_UINT count) in freelist_reserve() argument 130 list->next = vbus_ext->freelist_head; in freelist_reserve() 131 vbus_ext->freelist_head = list; in freelist_reserve() 132 list->dma = 0; in freelist_reserve() 133 list->size = size; in freelist_reserve() 134 list->head = 0; in freelist_reserve() 136 list->reserved_count = in freelist_reserve() 138 list->count = count; in freelist_reserve() 141 void *freelist_get(struct freelist *list) in freelist_get() argument 144 if (list->count) { in freelist_get() [all …]
|