/freebsd/sys/contrib/openzfs/lib/libuutil/ |
H A D | uu_list.c | 35 #define ELEM_TO_NODE(lp, e) \ argument 36 ((uu_list_node_impl_t *)((uintptr_t)(e) + (lp)->ul_offset)) 38 #define NODE_TO_ELEM(lp, n) \ argument 39 ((void *)((uintptr_t)(n) - (lp)->ul_offset)) 180 uu_list_t *lp, *next, *prev; in uu_list_create() local 196 lp = uu_zalloc(sizeof (*lp)); in uu_list_create() 197 if (lp == NULL) { in uu_list_create() 202 lp->ul_pool = pp; in uu_list_create() 203 lp in uu_list_create() 229 uu_list_destroy(uu_list_t * lp) uu_list_destroy() argument 261 list_insert(uu_list_t * lp,uu_list_node_impl_t * np,uu_list_node_impl_t * prev,uu_list_node_impl_t * next) list_insert() argument 290 uu_list_insert(uu_list_t * lp,void * elem,uu_list_index_t idx) uu_list_insert() argument 313 uu_list_find(uu_list_t * lp,void * elem,void * private,uu_list_index_t * out) uu_list_find() argument 346 uu_list_nearest_next(uu_list_t * lp,uu_list_index_t idx) uu_list_nearest_next() argument 371 uu_list_nearest_prev(uu_list_t * lp,uu_list_index_t idx) uu_list_nearest_prev() argument 395 list_walk_init(uu_list_walk_t * wp,uu_list_t * lp,uint32_t flags) list_walk_init() argument 425 list_walk_advance(uu_list_walk_t * wp,uu_list_t * lp) list_walk_advance() argument 454 uu_list_walk_start(uu_list_t * lp,uint32_t flags) uu_list_walk_start() argument 476 uu_list_t *lp = wp->ulw_list; uu_list_walk_next() local 493 uu_list_walk(uu_list_t * lp,uu_walk_fn_t * func,void * private,uint32_t flags) uu_list_walk() argument 538 uu_list_remove(uu_list_t * lp,void * elem) uu_list_remove() argument 578 uu_list_teardown(uu_list_t * lp,void ** cookie) uu_list_teardown() argument 596 uu_list_insert_before(uu_list_t * lp,void * target,void * elem) uu_list_insert_before() argument 622 uu_list_insert_after(uu_list_t * lp,void * target,void * elem) uu_list_insert_after() argument 648 uu_list_numnodes(uu_list_t * lp) uu_list_numnodes() argument 654 uu_list_first(uu_list_t * lp) uu_list_first() argument 663 uu_list_last(uu_list_t * lp) uu_list_last() argument 672 uu_list_next(uu_list_t * lp,void * elem) uu_list_next() argument 683 uu_list_prev(uu_list_t * lp,void * elem) uu_list_prev() argument [all...] |
/freebsd/sys/net/ |
H A D | ieee8023ad_lacp.c | 241 struct lacp_port *lp = LACP_PORT(lgp); in lacp_input() local 252 lacp_pdu_input(lp, m); in lacp_input() 256 lacp_marker_input(lp, m); in lacp_input() 268 lacp_pdu_input(struct lacp_port *lp, struct mbuf *m) in lacp_pdu_input() argument 270 struct lacp_softc *lsc = lp->lp_lsc; in lacp_pdu_input() 316 lacp_dprintf(lp, "lacpdu receive\n"); in lacp_pdu_input() 320 if ((1 << lp->lp_ifp->if_dunit) & lp->lp_lsc->lsc_debug.lsc_rx_test) { in lacp_pdu_input() 321 LACP_TPRINTF((lp, "Dropping RX PDU\n")); in lacp_pdu_input() 326 lacp_sm_rx(lp, du); in lacp_pdu_input() 338 lacp_fill_actorinfo(struct lacp_port *lp, struct lacp_peerinfo *info) in lacp_fill_actorinfo() argument [all …]
|
H A D | if_lagg.c | 396 lagg_proto_input(struct lagg_softc *sc, struct lagg_port *lp, struct mbuf *m) in lagg_proto_input() argument 399 return (lagg_protos[sc->sc_proto].pr_input(sc, lp, m)); in lagg_proto_input() 403 lagg_proto_addport(struct lagg_softc *sc, struct lagg_port *lp) in lagg_proto_addport() argument 409 return (lagg_protos[sc->sc_proto].pr_addport(lp)); in lagg_proto_addport() 413 lagg_proto_delport(struct lagg_softc *sc, struct lagg_port *lp) in lagg_proto_delport() argument 417 lagg_protos[sc->sc_proto].pr_delport(lp); in lagg_proto_delport() 421 lagg_proto_linkstate(struct lagg_softc *sc, struct lagg_port *lp) in lagg_proto_linkstate() argument 425 lagg_protos[sc->sc_proto].pr_linkstate(lp); in lagg_proto_linkstate() 461 lagg_proto_portreq(struct lagg_softc *sc, struct lagg_port *lp, void *v) in lagg_proto_portreq() argument 465 lagg_protos[sc->sc_proto].pr_portreq(lp, v); in lagg_proto_portreq() [all …]
|
/freebsd/sys/sys/ |
H A D | lockstat.h | 82 #define LOCKSTAT_RECORD0(probe, lp) \ argument 83 SDT_PROBE1(lockstat, , , probe, lp) 85 #define LOCKSTAT_RECORD1(probe, lp, arg1) \ argument 86 SDT_PROBE2(lockstat, , , probe, lp, arg1) 88 #define LOCKSTAT_RECORD2(probe, lp, arg1, arg2) \ argument 89 SDT_PROBE3(lockstat, , , probe, lp, arg1, arg2) 91 #define LOCKSTAT_RECORD3(probe, lp, arg1, arg2, arg3) \ argument 92 SDT_PROBE4(lockstat, , , probe, lp, arg1, arg2, arg3) 94 #define LOCKSTAT_RECORD4(probe, lp, arg1, arg2, arg3, arg4) \ argument 95 SDT_PROBE5(lockstat, , , probe, lp, arg1, arg2, arg3, arg4) [all …]
|
/freebsd/lib/libc/gen/ |
H A D | telldir.c | 51 struct ddloc_mem *lp, *flp; in telldir() local 71 LIST_FOREACH(lp, &dirp->dd_td->td_locq, loc_lqe) { in telldir() 72 if (lp->loc_seek == dirp->dd_seek) { in telldir() 74 flp = lp; in telldir() 75 if (lp->loc_loc == dirp->dd_loc) in telldir() 78 lp = NULL; in telldir() 82 if (lp == NULL) { in telldir() 83 lp = malloc(sizeof(struct ddloc_mem)); in telldir() 84 if (lp == NULL) { in telldir() 89 lp->loc_index = dirp->dd_td->td_loccnt++; in telldir() [all …]
|
/freebsd/sbin/bsdlabel/ |
H A D | bsdlabel.c | 290 fixlabel(struct disklabel *lp) in fixlabel() argument 295 for (i = 0; i < lp->d_npartitions; i++) { in fixlabel() 298 if (lp->d_partitions[i].p_size) in fixlabel() 302 dp = &lp->d_partitions[0]; in fixlabel() 304 dp->p_size = lp->d_secperunit - dp->p_offset; in fixlabel() 311 makelabel(const char *type, struct disklabel *lp) in makelabel() argument 321 *lp = *dp; in makelabel() 322 bzero(lp->d_packname, sizeof(lp->d_packname)); in makelabel() 373 struct disklabel *lp = &lab; in writelabel() local 381 lp->d_magic = DISKMAGIC; in writelabel() [all …]
|
/freebsd/bin/ed/ |
H A D | buf.c | 44 get_sbuf_line(line_t *lp) in get_sbuf_line() argument 51 if (lp == &buffer_head) in get_sbuf_line() 55 if (sfseek != lp->seek) { in get_sbuf_line() 56 sfseek = lp->seek; in get_sbuf_line() 63 len = lp->len; in get_sbuf_line() 81 line_t *lp; in put_sbuf_line() local 85 if ((lp = (line_t *) malloc(sizeof(line_t))) == NULL) { in put_sbuf_line() 95 free(lp); in put_sbuf_line() 104 free(lp); in put_sbuf_line() 115 free(lp); in put_sbuf_line() [all …]
|
H A D | glbl.c | 41 line_t *lp; in build_active_list() local 54 lp = get_addressed_line_node(first_addr); in build_active_list() 55 for (n = first_addr; n <= second_addr; n++, lp = lp->q_forw) { in build_active_list() 56 if ((s = get_sbuf_line(lp)) == NULL) in build_active_list() 59 NUL_TO_NEWLINE(s, lp->len); in build_active_list() 61 set_active_node(lp) < 0) in build_active_list() 76 line_t *lp = NULL; in exec_global() local 92 while ((lp = next_active_node()) != NULL) { in exec_global() 93 if ((current_addr = get_line_node_addr(lp)) < 0) in exec_global() 143 set_active_node(line_t *lp) in set_active_node() argument [all …]
|
/freebsd/usr.sbin/rpc.statd/ |
H A D | procs.c | 158 MonList *lp; in sm_mon_1_svc() local 190 lp = (MonList *)malloc(sizeof(MonList)); in sm_mon_1_svc() 191 if (!lp) in sm_mon_1_svc() 197 strncpy(lp->notifyHost, arg->mon_id.my_id.my_name, SM_MAXSTRLEN); in sm_mon_1_svc() 198 lp->notifyProg = arg->mon_id.my_id.my_prog; in sm_mon_1_svc() 199 lp->notifyVers = arg->mon_id.my_id.my_vers; in sm_mon_1_svc() 200 lp->notifyProc = arg->mon_id.my_id.my_proc; in sm_mon_1_svc() 201 memcpy(lp->notifyData, arg->priv, sizeof(lp->notifyData)); in sm_mon_1_svc() 203 lp->next = hp->monList; in sm_mon_1_svc() 204 hp->monList = lp; in sm_mon_1_svc() [all …]
|
/freebsd/libexec/revnetgroup/ |
H A D | parse_netgroup.c | 135 struct linelist *lp, *olp; in __endnetgrent() local 138 lp = linehead; in __endnetgrent() 139 while (lp) { in __endnetgrent() 140 olp = lp; in __endnetgrent() 141 lp = lp->l_next; in __endnetgrent() 179 struct linelist *lp = linehead; in parse_netgrp() local 184 while (lp) { in parse_netgrp() 185 if (!strcmp(group, lp->l_groupname)) in parse_netgrp() 187 lp = lp->l_next; in parse_netgrp() 189 if (lp == (struct linelist *)0 && in parse_netgrp() [all …]
|
/freebsd/usr.bin/paste/ |
H A D | paste.c | 118 LIST *lp; in parallel() local 127 if ((lp = malloc(sizeof(LIST))) == NULL) in parallel() 130 lp->fp = stdin; in parallel() 131 else if (!(lp->fp = fopen(p, "r"))) in parallel() 133 lp->next = NULL; in parallel() 134 lp->cnt = cnt; in parallel() 135 lp->name = p; in parallel() 137 head = tmp = lp; in parallel() 139 tmp->next = lp; in parallel() 140 tmp = lp; in parallel() [all …]
|
/freebsd/usr.sbin/ac/ |
H A D | ac.c | 270 struct user_entry *lp; in show_users() local 272 SLIST_FOREACH(lp, &Users, next) in show_users() 273 show(lp->user, lp->time); in show_users() 283 struct utmpx_entry *lp; in show_today() local 295 SLIST_FOREACH(lp, &CurUtmpx, next) { in show_today() 296 timersub(&today, &lp->time, &diff); in show_today() 297 update_user(lp->user, diff); in show_today() 299 lp->time = today; in show_today() 318 struct utmpx_entry *lp, *lp2, *tlp; in log_out() local 321 for (lp = SLIST_FIRST(&CurUtmpx), lp2 = NULL; lp != NULL;) in log_out() [all …]
|
/freebsd/sys/security/mac_veriexec/ |
H A D | veriexec_metadata.c | 107 struct veriexec_dev_list *lp; in get_veriexec_file() local 124 for (lp = LIST_FIRST(head); lp != NULL; lp = LIST_NEXT(lp, entries)) in get_veriexec_file() 125 if (lp->fsid == fsid) in get_veriexec_file() 129 if (lp != NULL) { in get_veriexec_file() 131 (uintmax_t)lp->fsid)); in get_veriexec_file() 138 LIST_FOREACH_SAFE(ip, &(lp->file_head), entries, tip) { in get_veriexec_file() 166 mac_veriexec_print_db_dev_list(struct sbuf *sbp, struct veriexec_dev_list *lp) in mac_veriexec_print_db_dev_list() argument 171 for (ip = LIST_FIRST(&(lp->file_head)); ip != NULL; in mac_veriexec_print_db_dev_list() 189 struct veriexec_dev_list *lp; in mac_veriexec_print_db_head() local 191 for (lp = LIST_FIRST(head); lp != NULL; lp = LIST_NEXT(lp, entries)) { in mac_veriexec_print_db_head() [all …]
|
/freebsd/usr.sbin/nfsdumpstate/ |
H A D | nfsdumpstate.c | 63 static struct nfsd_dumplocks lp[DUMPSIZE]; variable 186 dumplocklist.ndllck_list = (void *)lp; in dump_lockstate() 200 while (lp[cnt].ndlck_clid.nclid_idlen > 0 && cnt < DUMPSIZE) { in dump_lockstate() 201 if (lp[cnt].ndlck_flags & NFSLCK_OPEN) in dump_lockstate() 203 open_flags(lp[cnt].ndlck_flags), in dump_lockstate() 204 lp[cnt].ndlck_stateid.seqid, in dump_lockstate() 205 lp[cnt].ndlck_stateid.other[0], in dump_lockstate() 206 lp[cnt].ndlck_stateid.other[1], in dump_lockstate() 207 lp[cnt].ndlck_stateid.other[2]); in dump_lockstate() 208 else if (lp[cnt].ndlck_flags & (NFSLCK_DELEGREAD | in dump_lockstate() [all …]
|
/freebsd/sbin/recoverdisk/ |
H A D | recoverdisk.c | 193 report_histogram(const struct lump *lp) in report_histogram() argument 218 now = lp->start / bucket; in report_histogram() 240 report(const struct lump *lp, size_t sz) in report() argument 245 assert(lp != NULL); in report() 255 (intmax_t)lp->start, in report() 257 (intmax_t)lp->len, in report() 258 lp->state, in report() 267 report_histogram(lp); in report() 287 struct lump *lp; in new_lump() local 289 lp = malloc(sizeof *lp); in new_lump() [all …]
|
/freebsd/contrib/ntp/libntp/lib/isc/include/isc/ |
H A D | util.h | 97 #define LOCK(lp) do { \ argument 101 (lp), __FILE__, __LINE__)); \ 102 RUNTIME_CHECK(isc_mutex_lock((lp)) == ISC_R_SUCCESS); \ 106 (lp), __FILE__, __LINE__)); \ 108 #define UNLOCK(lp) do { \ argument 109 RUNTIME_CHECK(isc_mutex_unlock((lp)) == ISC_R_SUCCESS); \ 113 (lp), __FILE__, __LINE__)); \ 115 #define ISLOCKED(lp) (1) argument 116 #define DESTROYLOCK(lp) \ argument 117 RUNTIME_CHECK(isc_mutex_destroy((lp)) == ISC_R_SUCCESS) [all …]
|
/freebsd/tools/test/stress2/misc/ |
H A D | umountf2.sh | 283 struct log_entry *lp; 297 lp = &oplog[i]; 299 if (lp->operation == OP_CLOSEOPEN || 300 lp->operation == OP_INVALIDATE) { 301 switch (lp->operation) { 316 switch (lp->operation) { 319 lp->args[0], lp->args[0] + lp->args[1] - 1, 320 lp->args[1]); 321 if (badoff >= lp->args[0] && badoff < 322 lp->args[0] + lp->args[1]) [all …]
|
/freebsd/sys/kern/ |
H A D | subr_lock.c | 255 DPCPU_DEFINE_STATIC(struct lock_prof_cpu, lp); 256 #define LP_CPU_SELF (DPCPU_PTR(lp)) 257 #define LP_CPU(cpu) (DPCPU_ID_PTR((cpu), lp)) 371 lock_prof_output(struct lock_prof *lp, struct sbuf *sb) in lock_prof_output() argument 375 for (p = lp->file; p != NULL && strncmp(p, "../", 3) == 0; p += 3); in lock_prof_output() 378 lp->cnt_max / 1000, lp->cnt_wait_max / 1000, lp->cnt_tot / 1000, in lock_prof_output() 379 lp->cnt_wait / 1000, lp->cnt_cur, in lock_prof_output() 380 lp->cnt_cur == 0 ? (uintmax_t)0 : in lock_prof_output() 381 lp->cnt_tot / (lp->cnt_cur * 1000), in lock_prof_output() 382 lp->cnt_cur == 0 ? (uintmax_t)0 : in lock_prof_output() [all …]
|
/freebsd/usr.bin/lam/ |
H A D | lam.c | 188 char *lp = linep; in pad() local 190 strlcpy(lp, ip->sepstring, line + sizeof(line) - lp); in pad() 191 lp += strlen(lp); in pad() 193 snprintf(lp, line + sizeof(line) - lp, ip->format, ""); in pad() 194 lp += strlen(lp); in pad() 196 return (lp); in pad() 205 char *lp = linep; in gatherline() local 224 strlcpy(lp, ip->sepstring, line + sizeof(line) - lp); in gatherline() 225 lp += strlen(lp); in gatherline() 226 snprintf(lp, line + sizeof(line) - lp, ip->format, s); in gatherline() [all …]
|
/freebsd/contrib/nvi/vi/ |
H A D | v_section.c | 66 char *list, *lp; in v_sectionf() local 119 for (lp = list; *lp != '\0'; lp += 2 * sizeof(*lp)) in v_sectionf() 120 if (lp[0] == p[1] && in v_sectionf() 121 ((lp[1] == ' ' && len == 2) || lp[1] == p[2]) && in v_sectionf() 174 char *list, *lp; in v_sectionb() local 209 for (lp = list; *lp != '\0'; lp += 2 * sizeof(*lp)) in v_sectionb() 210 if (lp[0] == p[1] && in v_sectionb() 211 ((lp[1] == ' ' && len == 2) || lp[1] == p[2]) && in v_sectionb()
|
/freebsd/lib/libc/string/ |
H A D | strlen.c | 77 const unsigned long *lp; in strlen() local 90 lp = (const unsigned long *)((uintptr_t)str & ~LONGPTR_MASK); in strlen() 91 va = (*lp - mask01); in strlen() 92 vb = ((~*lp) & mask80); in strlen() 93 lp++; in strlen() 96 for (p = str; p < (const char *)lp; p++) in strlen() 101 for (; ; lp++) { in strlen() 102 va = (*lp - mask01); in strlen() 103 vb = ((~*lp) & mask80); in strlen() 105 p = (const char *)(lp); in strlen()
|
/freebsd/sys/libkern/ |
H A D | strlen.c | 77 const unsigned long *lp; in size_t() local 90 lp = (const unsigned long *)((uintptr_t)str & ~LONGPTR_MASK); in size_t() 91 va = (*lp - mask01); in size_t() 92 vb = ((~*lp) & mask80); in size_t() 93 lp++; in size_t() 96 for (p = str; p < (const char *)lp; p++) in size_t() 101 for (; ; lp++) { in size_t() 102 va = (*lp - mask01); in size_t() 103 vb = ((~*lp) & mask80); in size_t() 105 p = (const char *)(lp); in size_t()
|
/freebsd/cddl/contrib/opensolaris/lib/libdtrace/common/ |
H A D | dt_parser.c | 336 dt_type_promote(dt_node_t *lp, dt_node_t *rp, ctf_file_t **ofp, ctf_id_t *otype) in dt_type_promote() argument 338 ctf_file_t *lfp = lp->dn_ctfp; in dt_type_promote() 339 ctf_id_t ltype = lp->dn_type; in dt_type_promote() 407 dt_node_promote(dt_node_t *lp, dt_node_t *rp, dt_node_t *dnp) in dt_node_promote() argument 409 dt_type_promote(lp, rp, &dnp->dn_ctfp, &dnp->dn_type); in dt_node_promote() 411 dt_node_attr_assign(dnp, dt_attr_min(lp->dn_attr, rp->dn_attr)); in dt_node_promote() 1046 dt_node_is_ptrcompat(const dt_node_t *lp, const dt_node_t *rp, in dt_node_is_ptrcompat() argument 1049 ctf_file_t *lfp = lp->dn_ctfp; in dt_node_is_ptrcompat() 1060 assert(lp->dn_flags & DT_NF_COOKED); in dt_node_is_ptrcompat() 1063 if (dt_node_is_dynamic(lp) || dt_node_is_dynamic(rp)) in dt_node_is_ptrcompat() [all …]
|
/freebsd/usr.bin/join/ |
H A D | join.c | 264 LINE *lp, *lastlp, tmp; in slurp() local 301 lp = &F->set[F->setcnt]; in slurp() 315 if (lp->linealloc <= (size_t)(len + 1)) { in slurp() 316 lp->linealloc += MAX(100, len + 1 - lp->linealloc); in slurp() 317 if ((lp->line = in slurp() 318 realloc(lp->line, lp->linealloc)) == NULL) in slurp() 321 memmove(lp->line, buf, len); in slurp() 325 lp in slurp() 440 outoneline(INPUT * F,LINE * lp) outoneline() argument 510 outfield(LINE * lp,u_long fieldno,int out_empty) outfield() argument [all...] |
/freebsd/stand/libsa/ |
H A D | gets.c | 40 char *lp; in ngets() local 42 for (lp = buf;;) { in ngets() 49 *lp = '\0'; in ngets() 54 if (lp > buf) { in ngets() 55 lp--; in ngets() 65 for (p = buf; p < lp; ++p) in ngets() 71 lp = buf; in ngets() 75 if ((n < 1) || ((lp - buf) < n - 1)) { in ngets() 76 *lp++ = c; in ngets()
|