| /netbsd/src/sys/sys/ |
| D | time.h | 108 bintime_addx(struct bintime *bt, uint64_t x) in bintime_addx() argument 112 u = bt->frac; in bintime_addx() 113 bt->frac += x; in bintime_addx() 114 if (u > bt->frac) in bintime_addx() 115 bt->sec++; in bintime_addx() 119 bintime_add(struct bintime *bt, const struct bintime *bt2) in bintime_add() argument 123 u = bt->frac; in bintime_add() 124 bt->frac += bt2->frac; in bintime_add() 125 if (u > bt->frac) in bintime_add() 126 bt->sec++; in bintime_add() [all …]
|
| /netbsd/src/sys/kern/ |
| D | subr_vmem.c | 189 #define bt_free(vm, bt) free(bt) argument 258 bt_t *bt; in bt_refill_locked() local 270 bt = LIST_FIRST(&vmem_btag_freelist); in bt_refill_locked() 271 LIST_REMOVE(bt, bt_freelist); in bt_refill_locked() 272 bt->bt_flags = 0; in bt_refill_locked() 273 LIST_INSERT_HEAD(&vm->vm_freetags, bt, bt_freelist); in bt_refill_locked() 284 bt = pool_get(&vmem_btag_pool, PR_NOWAIT); in bt_refill_locked() 287 if (bt == NULL) in bt_refill_locked() 289 bt->bt_flags = 0; in bt_refill_locked() 290 LIST_INSERT_HEAD(&vm->vm_freetags, bt, bt_freelist); in bt_refill_locked() [all …]
|
| D | kern_condvar.c | 282 bintime2timo(const struct bintime *bt) in bintime2timo() argument 287 if (bt->sec > ((INT_MAX/2)/hz)) in bintime2timo() 289 if ((hz*(bt->frac >> 32) >> 32) > (INT_MAX/2 - hz*bt->sec)) in bintime2timo() 292 return hz*bt->sec + (hz*(bt->frac >> 32) >> 32); in bintime2timo() 340 cv_timedwaitbt(kcondvar_t *cv, kmutex_t *mtx, struct bintime *bt, in cv_timedwaitbt() argument 348 KASSERTMSG(bt->sec >= 0, "negative timeout"); in cv_timedwaitbt() 352 if (bt->sec == 0 && bt->frac == 0) in cv_timedwaitbt() 356 timo = bintime2timo(bt); in cv_timedwaitbt() 377 if (bintimecmp(bt, &slept, <=)) { in cv_timedwaitbt() 378 bt->sec = 0; in cv_timedwaitbt() [all …]
|
| D | kern_tc.c | 442 binuptime(struct bintime *bt) in binuptime() argument 487 *bt = th->th_offset; in binuptime() 488 bintime_addx(bt, th->th_scale * tc_delta(th)); in binuptime() 499 struct bintime bt; in nanouptime() local 502 binuptime(&bt); in nanouptime() 503 bintime2timespec(&bt, tsp); in nanouptime() 509 struct bintime bt; in microuptime() local 512 binuptime(&bt); in microuptime() 513 bintime2timeval(&bt, tvp); in microuptime() 517 bintime(struct bintime *bt) in bintime() argument [all …]
|
| /netbsd/src/sys/dev/sun/ |
| D | btreg.h | 77 #define BT_INIT(bt, shift) do { /* whatever this means.. */ \ argument 78 (bt)->bt_addr = 0x06 << (shift); /* command reg */ \ 79 (bt)->bt_ctrl = 0x73 << (shift); /* overlay plane */ \ 80 (bt)->bt_addr = 0x04 << (shift); /* read mask */ \ 81 (bt)->bt_ctrl = 0xff << (shift); /* color planes */ \ 83 #define BT_UNBLANK(bt, x, shift) do { \ argument 85 (bt)->bt_addr = 0 << (shift); \ 86 (bt)->bt_cmap = (x); \ 88 (bt)->bt_cmap = (x) << 8; \ 89 (bt)->bt_cmap = (x) << 16; \ [all …]
|
| /netbsd/src/sys/compat/ultrix/ |
| D | ultrix_ioctl.c | 144 stios2btios(struct emul_termios *st, struct termios *bt) in stios2btios() argument 148 memset(bt, 0, sizeof(*bt)); in stios2btios() 165 bt->c_iflag = r; in stios2btios() 194 bt->c_oflag = r; in stios2btios() 219 bt->c_cflag = r; in stios2btios() 221 bt->c_ispeed = bt->c_ospeed = s2btab[l & 0x0000000f]; in stios2btios() 239 bt->c_lflag = r; in stios2btios() 241 bt->c_cc[VINTR] = EMUL_TO_NATIVE_CC(st->c_cc[0]); in stios2btios() 242 bt->c_cc[VQUIT] = EMUL_TO_NATIVE_CC(st->c_cc[1]); in stios2btios() 243 bt->c_cc[VERASE] = EMUL_TO_NATIVE_CC(st->c_cc[2]); in stios2btios() [all …]
|
| /netbsd/src/sys/dev/ic/ |
| D | intersil7170.c | 78 bus_space_tag_t bt = sc->sc_bst; in intersil7170_gettime_ymdhms() local 89 bus_space_write_1(bt, bh, INTERSIL_ICMD, cmd); in intersil7170_gettime_ymdhms() 92 (void)bus_space_read_1(bt, bh, INTERSIL_ICSEC); /* not used */ in intersil7170_gettime_ymdhms() 93 dt->dt_hour = bus_space_read_1(bt, bh, INTERSIL_IHOUR); in intersil7170_gettime_ymdhms() 94 dt->dt_min = bus_space_read_1(bt, bh, INTERSIL_IMIN); in intersil7170_gettime_ymdhms() 95 dt->dt_sec = bus_space_read_1(bt, bh, INTERSIL_ISEC); in intersil7170_gettime_ymdhms() 96 dt->dt_mon = bus_space_read_1(bt, bh, INTERSIL_IMON); in intersil7170_gettime_ymdhms() 97 dt->dt_day = bus_space_read_1(bt, bh, INTERSIL_IDAY); in intersil7170_gettime_ymdhms() 98 year = bus_space_read_1(bt, bh, INTERSIL_IYEAR); in intersil7170_gettime_ymdhms() 99 dt->dt_wday = bus_space_read_1(bt, bh, INTERSIL_IDOW); in intersil7170_gettime_ymdhms() [all …]
|
| /netbsd/src/sys/compat/sunos/ |
| D | sunos_ioctl.c | 126 stios2btios(struct sunos_termios *st, struct termios *bt) in stios2btios() argument 130 memset(bt, 0, sizeof(*bt)); in stios2btios() 147 bt->c_iflag = r; in stios2btios() 176 bt->c_oflag = r; in stios2btios() 201 bt->c_cflag = r; in stios2btios() 203 bt->c_ispeed = bt->c_ospeed = s2btab[l & 0x0000000f]; in stios2btios() 221 bt->c_lflag = r; in stios2btios() 223 bt->c_cc[VINTR] = st->c_cc[0] ? st->c_cc[0] : _POSIX_VDISABLE; in stios2btios() 224 bt->c_cc[VQUIT] = st->c_cc[1] ? st->c_cc[1] : _POSIX_VDISABLE; in stios2btios() 225 bt->c_cc[VERASE] = st->c_cc[2] ? st->c_cc[2] : _POSIX_VDISABLE; in stios2btios() [all …]
|
| /netbsd/src/sys/external/isc/atheros_hal/dist/ar5416/ |
| D | ar5416_beacon.c | 36 ar5416SetBeaconTimers(struct ath_hal *ah, const HAL_BEACON_TIMERS *bt) in ar5416SetBeaconTimers() argument 40 OS_REG_WRITE(ah, AR_NEXT_TBTT, TU_TO_USEC(bt->bt_nexttbtt)); in ar5416SetBeaconTimers() 41 OS_REG_WRITE(ah, AR_NEXT_DBA, TU_TO_USEC(bt->bt_nextdba) >> 3); in ar5416SetBeaconTimers() 42 OS_REG_WRITE(ah, AR_NEXT_SWBA, TU_TO_USEC(bt->bt_nextswba) >> 3); in ar5416SetBeaconTimers() 43 OS_REG_WRITE(ah, AR_NEXT_NDP, TU_TO_USEC(bt->bt_nextatim)); in ar5416SetBeaconTimers() 45 bperiod = TU_TO_USEC(bt->bt_intval & HAL_BEACON_PERIOD); in ar5416SetBeaconTimers() 54 if (bt->bt_intval & AR_BEACON_RESET_TSF) in ar5416SetBeaconTimers() 60 bt->bt_flags != 0 ? bt->bt_flags : in ar5416SetBeaconTimers() 73 HAL_BEACON_TIMERS bt; in ar5416BeaconInit() local 75 bt.bt_nexttbtt = next_beacon; in ar5416BeaconInit() [all …]
|
| /netbsd/src/sys/compat/sunos32/ |
| D | sunos32_ioctl.c | 162 stios2btios(struct sunos_termios *st, struct termios *bt) in stios2btios() argument 166 memset(bt, 0, sizeof(*bt)); in stios2btios() 183 bt->c_iflag = r; in stios2btios() 212 bt->c_oflag = r; in stios2btios() 237 bt->c_cflag = r; in stios2btios() 239 bt->c_ispeed = bt->c_ospeed = s2btab[l & 0x0000000f]; in stios2btios() 257 bt->c_lflag = r; in stios2btios() 259 bt->c_cc[VINTR] = st->c_cc[0] ? st->c_cc[0] : _POSIX_VDISABLE; in stios2btios() 260 bt->c_cc[VQUIT] = st->c_cc[1] ? st->c_cc[1] : _POSIX_VDISABLE; in stios2btios() 261 bt->c_cc[VERASE] = st->c_cc[2] ? st->c_cc[2] : _POSIX_VDISABLE; in stios2btios() [all …]
|
| /netbsd/src/external/cddl/osnet/dist/uts/common/fs/zfs/ |
| D | bptree.c | 66 bptree_phys_t *bt; in bptree_alloc() local 78 bt = db->db_data; in bptree_alloc() 79 bt->bt_begin = 0; in bptree_alloc() 80 bt->bt_end = 0; in bptree_alloc() 81 bt->bt_bytes = 0; in bptree_alloc() 82 bt->bt_comp = 0; in bptree_alloc() 83 bt->bt_uncomp = 0; in bptree_alloc() 93 bptree_phys_t *bt; in bptree_free() local 96 bt = db->db_data; in bptree_free() 97 ASSERT3U(bt->bt_begin, ==, bt->bt_end); in bptree_free() [all …]
|
| /netbsd/src/sys/external/isc/atheros_hal/dist/ar5211/ |
| D | ar5211_beacon.c | 36 ar5211SetBeaconTimers(struct ath_hal *ah, const HAL_BEACON_TIMERS *bt) in ar5211SetBeaconTimers() argument 39 OS_REG_WRITE(ah, AR_TIMER0, bt->bt_nexttbtt); in ar5211SetBeaconTimers() 40 OS_REG_WRITE(ah, AR_TIMER1, bt->bt_nextdba); in ar5211SetBeaconTimers() 41 OS_REG_WRITE(ah, AR_TIMER2, bt->bt_nextswba); in ar5211SetBeaconTimers() 42 OS_REG_WRITE(ah, AR_TIMER3, bt->bt_nextatim); in ar5211SetBeaconTimers() 46 OS_REG_WRITE(ah, AR_BEACON, bt->bt_intval); in ar5211SetBeaconTimers() 56 HAL_BEACON_TIMERS bt; in ar5211BeaconInit() local 58 bt.bt_nextdba = 0; in ar5211BeaconInit() 59 bt.bt_nextswba = 0; in ar5211BeaconInit() 60 bt.bt_nexttbtt = next_beacon; in ar5211BeaconInit() [all …]
|
| /netbsd/src/sys/external/isc/atheros_hal/dist/ar5210/ |
| D | ar5210_beacon.c | 33 ar5210SetBeaconTimers(struct ath_hal *ah, const HAL_BEACON_TIMERS *bt) in ar5210SetBeaconTimers() argument 36 OS_REG_WRITE(ah, AR_TIMER0, bt->bt_nexttbtt); in ar5210SetBeaconTimers() 37 OS_REG_WRITE(ah, AR_TIMER1, bt->bt_nextdba); in ar5210SetBeaconTimers() 38 OS_REG_WRITE(ah, AR_TIMER2, bt->bt_nextswba); in ar5210SetBeaconTimers() 39 OS_REG_WRITE(ah, AR_TIMER3, bt->bt_nextatim); in ar5210SetBeaconTimers() 43 OS_REG_WRITE(ah, AR_BEACON, bt->bt_intval); in ar5210SetBeaconTimers() 53 HAL_BEACON_TIMERS bt; in ar5210BeaconInit() local 55 bt.bt_nexttbtt = next_beacon; in ar5210BeaconInit() 58 bt.bt_nextdba = (next_beacon - in ar5210BeaconInit() 60 bt.bt_nextswba = (next_beacon - in ar5210BeaconInit() [all …]
|
| /netbsd/src/external/bsd/pcc/dist/pcc/cc/cxxcom/ |
| D | builtins.c | 44 builtin_alloca(const struct bitable *bt, NODE *a) in builtin_alloca() argument 65 builtin_constant_p(const struct bitable *bt, NODE *a) in builtin_constant_p() argument 84 builtin_expect(const struct bitable *bt, NODE *a) in builtin_expect() argument 103 builtin_abs(const struct bitable *bt, NODE *a) in builtin_abs() argument 192 builtin_clz(const struct bitable *bt, NODE *a) in builtin_clz() argument 198 builtin_clzl(const struct bitable *bt, NODE *a) in builtin_clzl() argument 204 builtin_clzll(const struct bitable *bt, NODE *a) in builtin_clzll() argument 210 builtin_ctz(const struct bitable *bt, NODE *a) in builtin_ctz() argument 216 builtin_ctzl(const struct bitable *bt, NODE *a) in builtin_ctzl() argument 222 builtin_ctzll(const struct bitable *bt, NODE *a) in builtin_ctzll() argument [all …]
|
| /netbsd/src/sys/external/isc/atheros_hal/dist/ar5212/ |
| D | ar5212_beacon.c | 34 ar5212SetBeaconTimers(struct ath_hal *ah, const HAL_BEACON_TIMERS *bt) in ar5212SetBeaconTimers() argument 37 OS_REG_WRITE(ah, AR_TIMER0, bt->bt_nexttbtt); in ar5212SetBeaconTimers() 38 OS_REG_WRITE(ah, AR_TIMER1, bt->bt_nextdba); in ar5212SetBeaconTimers() 39 OS_REG_WRITE(ah, AR_TIMER2, bt->bt_nextswba); in ar5212SetBeaconTimers() 40 OS_REG_WRITE(ah, AR_TIMER3, bt->bt_nextatim); in ar5212SetBeaconTimers() 44 if (bt->bt_intval & AR_BEACON_RESET_TSF) { in ar5212SetBeaconTimers() 56 OS_REG_WRITE(ah, AR_BEACON, bt->bt_intval); in ar5212SetBeaconTimers() 69 HAL_BEACON_TIMERS bt; in ar5212BeaconInit() local 71 bt.bt_nexttbtt = next_beacon; in ar5212BeaconInit() 81 bt.bt_nextdba = 0xffff; in ar5212BeaconInit() [all …]
|
| /netbsd/src/external/bsd/pcc/dist/pcc/cc/ccom/ |
| D | builtins.c | 47 builtin_alloca(const struct bitable *bt, P1ND *a) in builtin_alloca() argument 68 builtin_constant_p(const struct bitable *bt, P1ND *a) in builtin_constant_p() argument 86 builtin_expect(const struct bitable *bt, P1ND *a) in builtin_expect() argument 105 builtin_abs(const struct bitable *bt, P1ND *a) in builtin_abs() argument 146 builtin_bswap16(const struct bitable *bt, P1ND *a) in builtin_bswap16() argument 157 builtin_bswap32(const struct bitable *bt, P1ND *a) in builtin_bswap32() argument 170 builtin_bswap64(const struct bitable *bt, P1ND *a) in builtin_bswap64() argument 242 builtin_clz(const struct bitable *bt, P1ND *a) in builtin_clz() argument 248 builtin_clzl(const struct bitable *bt, P1ND *a) in builtin_clzl() argument 254 builtin_clzll(const struct bitable *bt, P1ND *a) in builtin_clzll() argument [all …]
|
| /netbsd/src/sys/arch/news68k/dev/ |
| D | ms_hb.c | 119 bus_space_tag_t bt = ha->ha_bust; in ms_hb_attach() local 125 if (bus_space_map(bt, ha->ha_address, MS_SIZE, 0, &bh) != 0) { in ms_hb_attach() 132 sc->sc_bt = bt; in ms_hb_attach() 152 bus_space_tag_t bt = sc->sc_bt; in ms_hb_init() local 155 bus_space_write_1(bt, bh, MS_REG_RESET, 0); in ms_hb_init() 156 bus_space_write_1(bt, bh, MS_REG_INTE, MS_INTE); in ms_hb_init() 163 bus_space_tag_t bt = sc->sc_bt; in ms_hb_intr() local 167 while ((bus_space_read_1(bt, bh, MS_REG_STAT) & MSSTAT_RDY) != 0) { in ms_hb_intr() 172 bus_space_write_1(bt, bh, MS_REG_INTE, MS_INTE); in ms_hb_intr() 181 bus_space_tag_t bt = sc->sc_bt; in ms_hb_enable() local [all …]
|
| D | ms_kbc.c | 130 bus_space_tag_t bt = sc->sc_bt; in ms_kbc_init() local 133 bus_space_write_1(bt, bh, KBC_MSREG_RESET, 0); in ms_kbc_init() 134 bus_space_write_1(bt, bh, KBC_MSREG_INTE, KBC_INTE); in ms_kbc_init() 141 bus_space_tag_t bt = sc->sc_bt; in ms_kbc_intr() local 145 while (bus_space_read_1(bt, bh, KBC_MSREG_STAT) & KBCSTAT_MSRDY) { in ms_kbc_intr() 150 bus_space_write_1(bt, bh, KBC_MSREG_INTE, KBC_INTE); in ms_kbc_intr() 159 bus_space_tag_t bt = sc->sc_bt; in ms_kbc_enable() local 162 bus_space_write_1(bt, bh, KBC_MSREG_INTE, KBC_INTE); in ms_kbc_enable() 171 bus_space_tag_t bt = sc->sc_bt; in ms_kbc_disable() local 174 bus_space_write_1(bt, bh, KBC_MSREG_INTE, 0); in ms_kbc_disable()
|
| D | kb_hb.c | 90 bus_space_tag_t bt = ha->ha_bust; in kb_hb_attach() local 97 if (bus_space_map(bt, ha->ha_address, KB_SIZE, 0, &bh) != 0) { in kb_hb_attach() 104 sc->sc_bt = bt; in kb_hb_attach() 128 bus_space_tag_t bt = sc->sc_bt; in kb_hb_init() local 131 bus_space_write_1(bt, bh, KB_REG_RESET, 0); in kb_hb_init() 132 bus_space_write_1(bt, bh, KB_REG_INTE, KB_INTE); in kb_hb_init() 140 bus_space_tag_t bt = sc->sc_bt; in kb_hb_intr() local 146 stat = bus_space_read_1(bt, bh, KB_REG_STAT); in kb_hb_intr() 150 bus_space_write_1(bt, bh, KB_REG_INTE, KB_INTE); in kb_hb_intr()
|
| /netbsd/src/usr.bin/btpin/ |
| D | btpin.c | 55 struct sockaddr_bt bt; in main() local 165 memset(&bt, 0, sizeof(bt)); in main() 166 bt.bt_len = sizeof(bt); in main() 167 bt.bt_family = AF_BLUETOOTH; in main() 168 bdaddr_copy(&bt.bt_bdaddr, &rp.laddr); in main() 169 if (bind(s, (struct sockaddr *)&bt, sizeof(bt)) == -1) in main() 175 bt.bt_psm = L2CAP_PSM_SDP; in main() 176 bdaddr_copy(&bt.bt_bdaddr, &rp.raddr); in main() 177 if (connect(s, (struct sockaddr *)&bt, sizeof(bt)) == -1) { in main()
|
| /netbsd/src/usr.sbin/bad144/ |
| D | bad144.c | 111 struct bt_bad *bt; in main() local 201 bt = oldbad.bt_bad; in main() 203 bad = (bt->bt_cyl<<16) + bt->bt_trksec; in main() 207 (long long)badsn(bt), in main() 208 bt->bt_cyl, bt->bt_trksec>>8, bt->bt_trksec&0xff); in main() 209 bt++; in main() 356 struct bt_bad *bt; in checkold() local 369 bt = oldbad.bt_bad; in checkold() 370 for (i = 0; i < NBT_BAD; i++, bt++) { in checkold() 371 if (bt->bt_cyl == 0xffff && bt->bt_trksec == 0xffff) in checkold() [all …]
|
| /netbsd/src/common/lib/libc/arch/sh3/string/ |
| D | memcpy.S | 62 bt/s bcopy_return 75 bt/s bcopy_return 80 bt 1f 93 bt 1f 110 bt/s 2b 122 bt bcopy_return 127 bt 1f 144 bt/s 2b 151 bt bcopy_return 181 bt/s bcopy_return [all …]
|
| D | memset.S | 58 bt/s large 61 bt/s small 68 bt/s done 74 bt/s done 77 bt/s done 80 bt/s done 98 bt/s small_aligned 159 bt/s 1f 221 bt 9f 239 bt 9f [all …]
|
| /netbsd/src/sys/dev/isa/ |
| D | if_ix.c | 247 bus_space_write_2(sc->bt, sc->bh, IX_READPTR, offset); in ix_copyin() 252 *bptr = bus_space_read_1(sc->bt, sc->bh, IX_DATAPORT); in ix_copyin() 254 *bptr = bus_space_read_1(sc->bt, sc->bh, offset); in ix_copyin() 263 *wptr = bus_space_read_2(sc->bt, sc->bh, IX_DATAPORT); in ix_copyin() 267 bus_space_read_region_2(sc->bt, sc->bh, offset, in ix_copyin() 275 *bptr = bus_space_read_1(sc->bt, sc->bh, IX_DATAPORT); in ix_copyin() 277 *bptr = bus_space_read_1(sc->bt, sc->bh, offset); in ix_copyin() 291 bus_space_write_2(sc->bt, sc->bh, IX_WRITEPTR, offset); in ix_copyout() 296 bus_space_write_1(sc->bt, sc->bh, IX_DATAPORT, *bptr); in ix_copyout() 298 bus_space_write_1(sc->bt, sc->bh, offset, *bptr); in ix_copyout() [all …]
|
| /netbsd/src/sys/arch/sparc64/dev/ |
| D | central.c | 158 struct sparc_bus_space_tag *bt; in central_alloc_bus_tag() local 160 bt = kmem_zalloc(sizeof(*bt), KM_SLEEP); in central_alloc_bus_tag() 161 bt->cookie = sc; in central_alloc_bus_tag() 162 bt->parent = sc->sc_bt; in central_alloc_bus_tag() 164 bt->asi = bt->parent->asi; in central_alloc_bus_tag() 165 bt->sasi = bt->parent->sasi; in central_alloc_bus_tag() 167 bt->sparc_bus_map = _central_bus_map; in central_alloc_bus_tag() 170 return (bt); in central_alloc_bus_tag()
|