/freebsd/sys/kern/ |
H A D | subr_pidctrl.c | 36 pidctrl_init(struct pidctrl *pc, int interval, int setpoint, int bound, in pidctrl_init() argument 40 bzero(pc, sizeof(*pc)); in pidctrl_init() 41 pc->pc_setpoint = setpoint; in pidctrl_init() 42 pc->pc_interval = interval; in pidctrl_init() 43 pc->pc_bound = bound * setpoint * Kid; in pidctrl_init() 44 pc->pc_Kpd = Kpd; in pidctrl_init() 45 pc->pc_Kid = Kid; in pidctrl_init() 46 pc->pc_Kdd = Kdd; in pidctrl_init() 50 pidctrl_init_sysctl(struct pidctrl *pc, struct sysctl_oid_list *parent) in pidctrl_init_sysctl() argument 54 &pc->pc_error, 0, "Current difference from setpoint value (P)"); in pidctrl_init_sysctl() [all …]
|
/freebsd/crypto/openssl/test/ |
H A D | params_conversion_test.c | 35 static int param_conversion_load_stanza(PARAM_CONVERSION *pc, const STANZA *s) in param_conversion_load_stanza() argument 57 memset(pc, 0, sizeof(*pc)); in param_conversion_load_stanza() 66 pc->param = OSSL_PARAM_locate(params, type = pp->value); in param_conversion_load_stanza() 67 if (pc->param == NULL) { in param_conversion_load_stanza() 77 pc->valid_i32 = 1; in param_conversion_load_stanza() 78 pc->i32 = (int32_t)strtoimax(pp->value, &p, 10); in param_conversion_load_stanza() 86 pc->valid_i64 = 1; in param_conversion_load_stanza() 87 pc->i64 = (int64_t)strtoimax(pp->value, &p, 10); in param_conversion_load_stanza() 95 pc->valid_u32 = 1; in param_conversion_load_stanza() 96 pc->u32 = (uint32_t)strtoumax(pp->value, &p, 10); in param_conversion_load_stanza() [all …]
|
/freebsd/contrib/libpcap/ |
H A D | bpf_filter.c | 87 pcapint_filter_with_aux_data(const struct bpf_insn *pc, const u_char *p, in pcapint_filter_with_aux_data() argument 91 pcapint_filter_with_aux_data(const struct bpf_insn *pc, const u_char *p, in pcapint_filter_with_aux_data() 99 if (pc == 0) in pcapint_filter_with_aux_data() 106 --pc; in pcapint_filter_with_aux_data() 108 ++pc; in pcapint_filter_with_aux_data() 109 switch (pc->code) { in pcapint_filter_with_aux_data() 114 return (u_int)pc->k; in pcapint_filter_with_aux_data() 120 k = pc->k; in pcapint_filter_with_aux_data() 128 k = pc->k; in pcapint_filter_with_aux_data() 143 switch (pc->k) { in pcapint_filter_with_aux_data() [all …]
|
/freebsd/sys/dev/usb/ |
H A D | usb_busdma.c | 85 usbd_get_page(struct usb_page_cache *pc, usb_frlength_t offset, in usbd_get_page() argument 91 if (pc->page_start) { in usbd_get_page() 94 if (pc->buffer) { in usbd_get_page() 97 res->buffer = USB_ADD_BYTES(pc->buffer, offset); in usbd_get_page() 99 offset += pc->page_offset_buf; in usbd_get_page() 103 page = pc->page_start; in usbd_get_page() 105 if (pc->ismultiseg) { in usbd_get_page() 116 if (!pc->buffer) { in usbd_get_page() 126 res->buffer = USB_ADD_BYTES(pc->buffer, offset); in usbd_get_page() 140 usb_pc_buffer_is_aligned(struct usb_page_cache *pc, usb_frlength_t offset, in usb_pc_buffer_is_aligned() argument [all …]
|
/freebsd/sys/powerpc/powerpc/ |
H A D | mp_machdep.c | 147 struct pcpu *pc; in cpu_mp_start() local 174 pc = &__pcpu[cpu.cr_cpuid]; in cpu_mp_start() 177 pcpu_init(pc, cpu.cr_cpuid, sizeof(*pc)); in cpu_mp_start() 180 pc = pcpup; in cpu_mp_start() 181 pc->pc_cpuid = bsp.cr_cpuid; in cpu_mp_start() 182 pc->pc_bsp = 1; in cpu_mp_start() 184 pc->pc_domain = domain; in cpu_mp_start() 185 pc->pc_hwref = cpu.cr_hwref; in cpu_mp_start() 187 CPU_SET(pc->pc_cpuid, &cpuset_domain[pc->pc_domain]); in cpu_mp_start() 188 KASSERT(pc->pc_domain < MAXMEMDOM, ("bad domain value %d\n", in cpu_mp_start() [all …]
|
/freebsd/stand/usb/ |
H A D | usb_busdma_loader.c | 29 static void usb_pc_common_mem_cb(struct usb_page_cache *pc, 40 usbd_get_page(struct usb_page_cache *pc, usb_frlength_t offset, in usbd_get_page() argument 46 if (pc->page_start) { in usbd_get_page() 50 if (pc->buffer) { in usbd_get_page() 54 res->buffer = USB_ADD_BYTES(pc->buffer, offset); in usbd_get_page() 56 offset += pc->page_offset_buf; in usbd_get_page() 60 page = pc->page_start; in usbd_get_page() 62 if (pc->ismultiseg) { in usbd_get_page() 74 if (!pc->buffer) { in usbd_get_page() 85 res->buffer = USB_ADD_BYTES(pc->buffer, offset); in usbd_get_page() [all …]
|
/freebsd/sbin/bectl/ |
H A D | bectl_list.c | 57 static void print_padding(const char *fval, int colsz, struct printc *pc); 58 static int print_snapshots(const char *dsname, struct printc *pc); 59 static void print_info(const char *name, nvlist_t *dsprops, struct printc *pc); 60 static void print_headers(nvlist_t *props, struct printc *pc); 101 print_padding(const char *fval, int colsz, struct printc *pc) in print_padding() argument 105 if (pc->script_fmt) { in print_padding() 152 print_snapshots(const char *dsname, struct printc *pc) in print_snapshots() argument 168 print_info(nvpair_name(cur), sprops, pc); in print_snapshots() 174 print_info(const char *name, nvlist_t *dsprops, struct printc *pc) in print_info() argument 186 printf("%*s%s", pc->current_indent, "", name); in print_info() [all …]
|
/freebsd/contrib/llvm-project/compiler-rt/lib/tsan/rtl/ |
H A D | tsan_fd.cpp | 56 static FdSync *allocsync(ThreadState *thr, uptr pc) { in allocsync() argument 57 FdSync *s = (FdSync*)user_alloc_internal(thr, pc, sizeof(FdSync), in allocsync() 69 static void unref(ThreadState *thr, uptr pc, FdSync *s) { in unref() argument 75 user_free(thr, pc, s, false); in unref() 80 static FdDesc *fddesc(ThreadState *thr, uptr pc, int fd) { in fddesc() argument 88 void *p = user_alloc_internal(thr, pc, size, kDefaultAlignment, false); in fddesc() 94 user_free(thr, pc, p, false); in fddesc() 101 static void init(ThreadState *thr, uptr pc, int fd, FdSync *s, in init() argument 103 FdDesc *d = fddesc(thr, pc, fd); in init() 107 unref(thr, pc, d->sync); in init() [all …]
|
H A D | tsan_rtl_mutex.cpp | 25 void ReportDeadlock(ThreadState *thr, uptr pc, DDReport *r); 26 void ReportDestroyLocked(ThreadState *thr, uptr pc, uptr addr, 31 uptr pc; member 33 Callback(ThreadState *thr, uptr pc) in Callback() 35 , pc(pc) { in Callback() 40 StackID Unwind() override { return CurrentStackId(thr, pc); } in Unwind() 44 void DDMutexInit(ThreadState *thr, uptr pc, SyncVar *s) { in DDMutexInit() argument 45 Callback cb(thr, pc); in DDMutexInit() 50 static void ReportMutexMisuse(ThreadState *thr, uptr pc, ReportType typ, in ReportMutexMisuse() argument 62 ObtainCurrentStack(thr, pc, &trace); in ReportMutexMisuse() [all …]
|
H A D | tsan_fd.h | 41 void FdAcquire(ThreadState *thr, uptr pc, int fd); 42 void FdRelease(ThreadState *thr, uptr pc, int fd); 43 void FdAccess(ThreadState *thr, uptr pc, int fd); 44 void FdClose(ThreadState *thr, uptr pc, int fd, bool write = true); 45 void FdFileCreate(ThreadState *thr, uptr pc, int fd); 46 void FdDup(ThreadState *thr, uptr pc, int oldfd, int newfd, bool write); 47 void FdPipeCreate(ThreadState *thr, uptr pc, int rfd, int wfd); 48 void FdEventCreate(ThreadState *thr, uptr pc, int fd); 49 void FdSignalCreate(ThreadState *thr, uptr pc, int fd); 50 void FdInotifyCreate(ThreadState *thr, uptr pc, int fd); [all …]
|
H A D | tsan_interceptors_posix.cpp | 201 uptr pc; member 276 uptr pc) in ScopedInterceptor() argument 290 if (!thr_->ignore_interceptors) FuncEntry(thr, pc); in ScopedInterceptor() 294 libignore()->IsIgnored(pc, &in_ignored_lib_)); in ScopedInterceptor() 354 #define READ_STRING_OF_LEN(thr, pc, s, len, n) \ argument 355 MemoryAccessRange((thr), (pc), (uptr)(s), \ 358 #define READ_STRING(thr, pc, s, n) \ argument 359 READ_STRING_OF_LEN((thr), (pc), (s), internal_strlen(s), (n)) 386 AfterSleep(thr, pc); in TSAN_INTERCEPTOR() 393 AfterSleep(thr, pc); in TSAN_INTERCEPTOR() [all …]
|
H A D | tsan_mman.cpp | 177 static void SignalUnsafeCall(ThreadState *thr, uptr pc) { in SignalUnsafeCall() argument 182 ObtainCurrentStack(thr, pc, &stack); in SignalUnsafeCall() 192 void *user_alloc_internal(ThreadState *thr, uptr pc, uptr sz, uptr align, in user_alloc_internal() argument 200 GET_STACK_TRACE_FATAL(thr, pc); in user_alloc_internal() 206 GET_STACK_TRACE_FATAL(thr, pc); in user_alloc_internal() 214 GET_STACK_TRACE_FATAL(thr, pc); in user_alloc_internal() 218 OnUserAlloc(thr, pc, (uptr)p, sz, true); in user_alloc_internal() 220 SignalUnsafeCall(thr, pc); in user_alloc_internal() 224 void user_free(ThreadState *thr, uptr pc, void *p, bool signal) { in user_free() argument 227 OnUserFree(thr, pc, (uptr)p, true); in user_free() [all …]
|
/freebsd/usr.bin/grep/ |
H A D | util.c | 67 static void procmatch_match(struct mprintc *mc, struct parsec *pc); 68 static void procmatch_nomatch(struct mprintc *mc, struct parsec *pc); 69 static bool procmatches(struct mprintc *mc, struct parsec *pc, bool matched); 74 static bool procline(struct parsec *pc); 75 static void printline(struct parsec *pc, int sep); 204 procmatch_match(struct mprintc *mc, struct parsec *pc) in procmatch_match() argument 217 printline(pc, ':'); in procmatch_match() 218 while (pc->matchidx >= MAX_MATCHES) { in procmatch_match() 220 pc->matchidx = 0; in procmatch_match() 221 if (procline(pc) == !vflag) in procmatch_match() [all …]
|
/freebsd/contrib/ofed/infiniband-diags/src/ |
H A D | perfquery.c | 110 static uint8_t pc[1024]; variable 171 mad_decode_field(pc, IB_PC_PORT_SELECT_F, &val); in aggregate_perfcounters() 173 mad_decode_field(pc, IB_PC_COUNTER_SELECT_F, &val); in aggregate_perfcounters() 175 mad_decode_field(pc, IB_PC_ERR_SYM_F, &val); in aggregate_perfcounters() 177 mad_decode_field(pc, IB_PC_LINK_RECOVERS_F, &val); in aggregate_perfcounters() 179 mad_decode_field(pc, IB_PC_LINK_DOWNED_F, &val); in aggregate_perfcounters() 181 mad_decode_field(pc, IB_PC_ERR_RCV_F, &val); in aggregate_perfcounters() 183 mad_decode_field(pc, IB_PC_ERR_PHYSRCV_F, &val); in aggregate_perfcounters() 185 mad_decode_field(pc, IB_PC_ERR_SWITCH_REL_F, &val); in aggregate_perfcounters() 187 mad_decode_field(pc, IB_PC_XMT_DISCARDS_F, &val); in aggregate_perfcounters() [all …]
|
/freebsd/sbin/ipf/ipf/ |
H A D | bpf_filter.c | 176 bpf_filter(struct bpf_insn *pc, u_char *p, u_int wirelen, u_int buflen) in bpf_filter() argument 192 if (pc == NULL) in bpf_filter() 199 --pc; in bpf_filter() 201 ++pc; in bpf_filter() 202 switch (pc->code) { in bpf_filter() 207 return (u_int)pc->k; in bpf_filter() 213 k = pc->k; in bpf_filter() 226 k = pc->k; in bpf_filter() 239 k = pc->k; in bpf_filter() 260 k = X + pc->k; in bpf_filter() [all …]
|
/freebsd/sys/net/ |
H A D | bpf_filter.c | 174 bpf_filter(const struct bpf_insn *pc, u_char *p, u_int wirelen, u_int buflen) in bpf_filter() argument 182 if (pc == NULL) in bpf_filter() 188 --pc; in bpf_filter() 190 ++pc; in bpf_filter() 191 switch (pc->code) { in bpf_filter() 200 return ((u_int)pc->k); in bpf_filter() 206 k = pc->k; in bpf_filter() 230 k = pc->k; in bpf_filter() 247 k = pc->k; in bpf_filter() 274 k = X + pc->k; in bpf_filter() [all …]
|
/freebsd/sys/dev/hwpmc/ |
H A D | hwpmc_x86.c | 78 uintptr_t fp, oldfp, pc, r, sp; in pmc_save_user_callchain() local 83 pc = PMC_TRAPFRAME_TO_PC(tf); in pmc_save_user_callchain() 87 *cc++ = pc; n = 1; in pmc_save_user_callchain() 91 if (!PMC_IN_USERSPACE(pc)) in pmc_save_user_callchain() 94 if (copyin((void *) pc, &instr, sizeof(instr)) != 0) in pmc_save_user_callchain() 99 if (copyin((void *) sp, &pc, sizeof(pc)) != 0) in pmc_save_user_callchain() 103 if (copyin((void *) sp, &pc, sizeof(pc)) != 0) in pmc_save_user_callchain() 105 } else if (copyin((void *) r, &pc, sizeof(pc)) != 0 || in pmc_save_user_callchain() 110 if (pc == 0 || !PMC_IN_USERSPACE(pc)) in pmc_save_user_callchain() 113 *cc++ = pc; n++; in pmc_save_user_callchain() [all …]
|
H A D | hwpmc_arm.c | 77 uintptr_t pc, ra, fp; in pmc_save_kernel_callchain() local 83 pc = PMC_TRAPFRAME_TO_PC(tf); in pmc_save_kernel_callchain() 84 *cc++ = pc; in pmc_save_kernel_callchain() 90 if (!PMC_IN_KERNEL(pc) || !PMC_IN_KERNEL_STACK(fp)) in pmc_save_kernel_callchain() 98 pc = *(uintptr_t *)ra; in pmc_save_kernel_callchain() 99 if (!PMC_IN_KERNEL(pc)) in pmc_save_kernel_callchain() 102 *cc++ = pc; in pmc_save_kernel_callchain() 120 uintptr_t pc, r, oldfp, fp; in pmc_save_user_callchain() local 126 pc = PMC_TRAPFRAME_TO_PC(tf); in pmc_save_user_callchain() 127 *cc++ = pc; in pmc_save_user_callchain() [all …]
|
/freebsd/contrib/bearssl/src/ssl/ |
H A D | ssl_scert_single_ec.c | 32 br_ssl_server_policy_ec_context *pc; in se_choose() local 37 pc = (br_ssl_server_policy_ec_context *)pctx; in se_choose() 43 choices->chain = pc->chain; in se_choose() 44 choices->chain_len = pc->chain_len; in se_choose() 51 if ((pc->allowed_usages & BR_KEYTYPE_KEYX) != 0 in se_choose() 52 && pc->cert_issuer_key_type == BR_KEYTYPE_RSA) in se_choose() 59 if ((pc->allowed_usages & BR_KEYTYPE_KEYX) != 0 in se_choose() 60 && pc->cert_issuer_key_type == BR_KEYTYPE_EC) in se_choose() 67 if ((pc->allowed_usages & BR_KEYTYPE_SIGN) != 0 in se_choose() 84 br_ssl_server_policy_ec_context *pc; in se_do_keyx() local [all …]
|
/freebsd/sys/dev/rtwn/pci/ |
H A D | rtwn_pci_reg.c | 53 struct rtwn_pci_softc *pc = RTWN_PCI_SOFTC(sc); in rtwn_pci_write_1() local 55 bus_space_write_1(pc->pc_st, pc->pc_sh, addr, val); in rtwn_pci_write_1() 63 struct rtwn_pci_softc *pc = RTWN_PCI_SOFTC(sc); in rtwn_pci_write_2() local 66 bus_space_write_2(pc->pc_st, pc->pc_sh, addr, val); in rtwn_pci_write_2() 74 struct rtwn_pci_softc *pc = RTWN_PCI_SOFTC(sc); in rtwn_pci_write_4() local 77 bus_space_write_4(pc->pc_st, pc->pc_sh, addr, val); in rtwn_pci_write_4() 85 struct rtwn_pci_softc *pc = RTWN_PCI_SOFTC(sc); in rtwn_pci_read_1() local 87 return (bus_space_read_1(pc->pc_st, pc->pc_sh, addr)); in rtwn_pci_read_1() 93 struct rtwn_pci_softc *pc = RTWN_PCI_SOFTC(sc); in rtwn_pci_read_2() local 96 val = bus_space_read_2(pc->pc_st, pc->pc_sh, addr); in rtwn_pci_read_2() [all …]
|
H A D | rtwn_pci_attach.c | 124 struct rtwn_pci_softc *pc = RTWN_PCI_SOFTC(sc); in rtwn_pci_alloc_rx_list() local 125 struct rtwn_rx_ring *rx_ring = &pc->rx_ring; in rtwn_pci_alloc_rx_list() 193 rtwn_pci_setup_rx_desc(pc, &rx_ring->desc[i], rx_data->paddr, in rtwn_pci_alloc_rx_list() 208 struct rtwn_pci_softc *pc = RTWN_PCI_SOFTC(sc); in rtwn_pci_reset_rx_list() local 209 struct rtwn_rx_ring *rx_ring = &pc->rx_ring; in rtwn_pci_reset_rx_list() 215 rtwn_pci_setup_rx_desc(pc, &rx_ring->desc[i], in rtwn_pci_reset_rx_list() 224 struct rtwn_pci_softc *pc = RTWN_PCI_SOFTC(sc); in rtwn_pci_free_rx_list() local 225 struct rtwn_rx_ring *rx_ring = &pc->rx_ring; in rtwn_pci_free_rx_list() 266 struct rtwn_pci_softc *pc = RTWN_PCI_SOFTC(sc); in rtwn_pci_alloc_tx_list() local 267 struct rtwn_tx_ring *tx_ring = &pc->tx_ring[qid]; in rtwn_pci_alloc_tx_list() [all …]
|
H A D | rtwn_pci_rx.c | 69 rtwn_pci_setup_rx_desc(struct rtwn_pci_softc *pc, in rtwn_pci_setup_rx_desc() argument 77 bus_space_barrier(pc->pc_st, pc->pc_sh, 0, pc->pc_mapsize, in rtwn_pci_setup_rx_desc() 83 rtwn_pci_rx_frame(struct rtwn_pci_softc *pc) in rtwn_pci_rx_frame() argument 85 struct rtwn_softc *sc = &pc->pc_sc; in rtwn_pci_rx_frame() 86 struct rtwn_rx_ring *ring = &pc->rx_ring; in rtwn_pci_rx_frame() 180 rtwn_pci_rx_buf_copy(struct rtwn_pci_softc *pc) in rtwn_pci_rx_buf_copy() argument 182 struct rtwn_rx_ring *ring = &pc->rx_ring; in rtwn_pci_rx_buf_copy() 193 KASSERT(sizeof(pc->pc_rx_buf) >= desc_size, in rtwn_pci_rx_buf_copy() 196 memcpy(pc->pc_rx_buf, rx_desc, desc_size); in rtwn_pci_rx_buf_copy() 201 if (pktlen > sizeof(pc->pc_rx_buf) - desc_size) in rtwn_pci_rx_buf_copy() [all …]
|
/freebsd/contrib/llvm-project/compiler-rt/lib/sanitizer_common/ |
H A D | sanitizer_stacktrace.h | 79 static inline uptr GetPreviousInstructionPc(uptr pc); 80 static uptr GetNextInstructionPc(uptr pc); 85 uptr StackTrace::GetPreviousInstructionPc(uptr pc) { in GetPreviousInstructionPc() argument 90 return (pc - 3) & (~1); in GetPreviousInstructionPc() 92 return pc - 8; in GetPreviousInstructionPc() 100 return pc - 2; in GetPreviousInstructionPc() 102 return pc - 1; in GetPreviousInstructionPc() 104 return pc - 4; in GetPreviousInstructionPc() 120 void Unwind(uptr pc, uptr bp, void *context, bool request_fast, 126 trace_buffer[0] = pc; [all …]
|
/freebsd/contrib/openbsm/etc/ |
H A D | audit_event | 22 1:AUE_EXIT:exit(2):pc 23 2:AUE_FORK:fork(2):pc 28 7:AUE_EXEC:exec(2):pc,ex 29 8:AUE_CHDIR:chdir(2):pc 36 15:AUE_KILL:kill(2):pc 44 23:AUE_EXECVE:execve(2):pc,ex 45 24:AUE_CHROOT:chroot(2):pc 46 25:AUE_VFORK:vfork(2):pc 47 26:AUE_SETGROUPS:setgroups(2):pc 48 27:AUE_SETPGRP:setpgrp(2):pc [all...] |
/freebsd/contrib/llvm-project/lldb/source/Plugins/Instruction/MIPS64/ |
H A D | EmulateInstructionMIPS64.cpp | 1332 int64_t offset, pc, rs_val, rt_val, target = 0; in Emulate_BXX_3ops() local 1339 pc = ReadRegisterUnsigned(eRegisterKindDWARF, dwarf_pc_mips64, 0, &success); in Emulate_BXX_3ops() 1356 target = pc + offset; in Emulate_BXX_3ops() 1358 target = pc + 8; in Emulate_BXX_3ops() 1363 target = pc + offset; in Emulate_BXX_3ops() 1365 target = pc + 8; in Emulate_BXX_3ops() 1384 int64_t offset, pc, target = 0; in Emulate_Bcond_Link() local 1391 pc = ReadRegisterUnsigned(eRegisterKindDWARF, dwarf_pc_mips64, 0, &success); in Emulate_Bcond_Link() 1403 target = pc + offset; in Emulate_Bcond_Link() 1405 target = pc + 8; in Emulate_Bcond_Link() [all …]
|