| /freebsd-13.1/sys/compat/linux/ |
| H A D | linux_event.c | 643 tfd = malloc(sizeof(*tfd), M_EPOLL, M_WAITOK | M_ZERO); in linux_timerfd_create() 647 callout_init_mtx(&tfd->tfd_callout, &tfd->tfd_lock, 0); in linux_timerfd_create() 648 knlist_init_mtx(&tfd->tfd_sel.si_note, &tfd->tfd_lock); in linux_timerfd_create() 666 tfd = fp->f_data; in timerfd_close() 693 tfd = fp->f_data; in timerfd_read() 735 tfd = fp->f_data; in timerfd_poll() 754 tfd = fp->f_data; in timerfd_kqfilter() 763 kn->kn_hook = tfd; in timerfd_kqfilter() 860 tfd = fp->f_data; in linux_timerfd_gettime() 903 tfd = fp->f_data; in linux_timerfd_settime() [all …]
|
| /freebsd-13.1/contrib/netbsd-tests/rump/rumpvfs/ |
| H A D | t_etfs.c | 66 int tfd; in ATF_TC_BODY() local 82 ATF_REQUIRE(tfd != -1); in ATF_TC_BODY() 84 rump_sys_close(tfd); in ATF_TC_BODY() 90 ATF_REQUIRE(tfd != -1); in ATF_TC_BODY() 122 int rv, tfd; in ATF_TC_BODY() local 138 ATF_REQUIRE(tfd != -1); in ATF_TC_BODY() 148 ATF_REQUIRE(tfd != -1); in ATF_TC_BODY() 170 int rv, tfd; in ATF_TC_BODY() local 195 ATF_REQUIRE(tfd != -1); in ATF_TC_BODY() 205 ATF_REQUIRE(tfd != -1); in ATF_TC_BODY() [all …]
|
| /freebsd-13.1/usr.bin/setchannel/ |
| H A D | setchannel.c | 94 int tfd; in main() local 214 tfd = open(dev_name, O_RDONLY); in main() 215 if (tfd < 0) { in main() 222 if (ioctl(tfd, TVTUNER_SETAFC, &afc) < 0) { in main() 228 if (ioctl(tfd, METEORSINPUT, &device) < 0) { in main() 234 if (ioctl(tfd, BT848_SAUDIO, &audio) < 0) { in main() 239 if (ioctl(tfd, BT848_GAUDIO, &audio) < 0) { in main() 248 if (ioctl(tfd, BT848_SCAPAREA, &cap) < 0) { in main() 270 if (ioctl(tfd, RADIO_SETFREQ, &freq) < 0) { in main() 278 if (ioctl(tfd, TVTUNER_SETFREQ, &freq) < 0) { in main() [all …]
|
| /freebsd-13.1/sbin/ipf/libipf/ |
| H A D | ipft_hx.c | 28 static int tfd = -1; variable 33 if (tfp && tfd != -1) { in hex_open() 35 return (tfd); in hex_open() 39 tfd = 0; in hex_open() 42 tfd = open(fname, O_RDONLY); in hex_open() 43 if (tfd != -1) in hex_open() 44 tfp = fdopen(tfd, "r"); in hex_open() 46 return (tfd); in hex_open() 53 int cfd = tfd; in hex_close() 55 tfd = -1; in hex_close()
|
| H A D | ipft_tx.c | 34 static int tfd = -1; variable 89 if (tfp && tfd != -1) { in text_open() 91 return (tfd); in text_open() 95 tfd = 0; in text_open() 98 tfd = open(fname, O_RDONLY); in text_open() 99 if (tfd != -1) in text_open() 100 tfp = fdopen(tfd, "r"); in text_open() 102 return (tfd); in text_open() 109 int cfd = tfd; in text_close() 111 tfd = -1; in text_close()
|
| /freebsd-13.1/sys/contrib/dev/iwlwifi/queue/ |
| H A D | tx.c | 119 tfd->num_tbs = 0; in iwl_txq_gen2_tfd_unmap() 169 tb = &tfd->tbs[idx]; in iwl_txq_gen2_set_tb() 172 if (le16_to_cpu(tfd->num_tbs) >= trans->txqs.tfd.max_tbs) { in iwl_txq_gen2_set_tb() 348 trace_iwlwifi_dev_tx(trans->dev, skb, tfd, sizeof(*tfd), in iwl_txq_gen2_build_amsdu() 511 return tfd; in iwl_txq_gen2_build_tx_amsdu() 634 return tfd; in iwl_txq_gen2_build_tx() 657 memset(tfd, 0, sizeof(*tfd)); in iwl_txq_gen2_build_tfd() 718 void *tfd; in iwl_txq_gen2_tx() local 767 if (!tfd) { in iwl_txq_gen2_tx() 1350 tfd = _tfd; in iwl_txq_gen1_tfd_tb_get_addr() [all …]
|
| H A D | tx.h | 44 return (u8 *)txq->tfds + trans->txqs.tfd.size * idx; in iwl_txq_get_tfd() 108 struct iwl_tfh_tfd *tfd, dma_addr_t addr, 113 struct iwl_tfh_tfd *tfd); 136 struct iwl_tfd *tfd; in iwl_txq_gen1_tfd_get_num_tbs() local 144 tfd = (struct iwl_tfd *)_tfd; in iwl_txq_gen1_tfd_get_num_tbs() 145 return tfd->num_tbs & 0x1f; in iwl_txq_gen1_tfd_get_num_tbs() 151 struct iwl_tfd *tfd; in iwl_txq_gen1_tfd_tb_get_len() local 161 tfd = (struct iwl_tfd *)_tfd; in iwl_txq_gen1_tfd_tb_get_len() 162 tb = &tfd->tbs[idx]; in iwl_txq_gen1_tfd_tb_get_len()
|
| /freebsd-13.1/sys/contrib/openzfs/tests/zfs-tests/tests/functional/cp_files/ |
| H A D | cp_files.c | 14 int tfd; in main() local 30 tfd = open(argv[2], O_DIRECTORY); in main() 31 if (tfd < 0) { in main() 43 int fd = openat(tfd, dirent->d_name, O_CREAT|O_WRONLY, 0666); in main() 48 close(tfd); in main() 55 close(tfd); in main()
|
| /freebsd-13.1/contrib/libbegemot/ |
| H A D | rpoll.c | 432 if(tfd[i] == handle) { in poll_stop_timer() 433 tfd[i] = -1; in poll_stop_timer() 467 tfd = _xrealloc(tfd, sizeof(int *) * tfd_alloc); in sort_timers() 470 pp = tfd; in sort_timers() 615 if(tfd[i] < 0) in poll_dispatch() 621 (*tims[tfd[i]].func)(tfd[i], tims[tfd[i]].arg); in poll_dispatch() 622 if(tfd[i] < 0) in poll_dispatch() 624 if(tims[tfd[i]].repeat) in poll_dispatch() 625 tims[tfd[i]].when = now + tims[tfd[i]].usecs; in poll_dispatch() 627 tims[tfd[i]].func = NULL; in poll_dispatch() [all …]
|
| /freebsd-13.1/usr.sbin/pw/ |
| H A D | grupd.c | 56 int pfd, tfd; in gr_update() local 73 if ((tfd = gr_tmp(-1)) == -1) { in gr_update() 77 if (gr_copy(pfd, tfd, gr, old_gr) == -1) { in gr_update() 79 close(tfd); in gr_update() 82 fsync(tfd); in gr_update() 83 close(tfd); in gr_update()
|
| H A D | pw_nis.c | 46 int pfd, tfd; in pw_nisupdate() local 63 if ((tfd = pw_tmp(-1)) == -1) { in pw_nisupdate() 67 if (pw_copy(pfd, tfd, pw, old_pw) == -1) { in pw_nisupdate() 69 close(tfd); in pw_nisupdate() 72 fsync(tfd); in pw_nisupdate() 73 close(tfd); in pw_nisupdate()
|
| H A D | pwupd.c | 93 int rc, pfd, tfd; in pw_update() local 110 if ((tfd = pw_tmp(-1)) == -1) { in pw_update() 114 if (pw_copy(pfd, tfd, pw, old_pw) == -1) { in pw_update() 116 close(tfd); in pw_update() 119 fsync(tfd); in pw_update() 120 close(tfd); in pw_update()
|
| /freebsd-13.1/contrib/mandoc/ |
| H A D | tag.c | 62 tag_files.tfd = -1; in tag_init() 101 if ((tag_files.tfd = mkstemp(tag_files.tfn)) == -1) { in tag_init() 126 if (tag_files.tfd != -1) in tag_init() 127 close(tag_files.tfd); in tag_init() 131 tag_files.tfd = -1; in tag_init() 147 if (tag_files.tfd <= 0) in tag_put() 230 if (tag_files.tfd <= 0) in tag_write() 237 if ((stream = fdopen(tag_files.tfd, "w")) == NULL) in tag_write() 257 close(tag_files.tfd); in tag_write() 258 tag_files.tfd = -1; in tag_write()
|
| /freebsd-13.1/usr.sbin/bhyve/ |
| H A D | mevent.c | 277 mevent_add_state(int tfd, enum ev_type type, in mevent_add_state() argument 285 if (tfd < 0 || func == NULL) { in mevent_add_state() 299 if (type != EVF_TIMER && lp->me_fd == tfd && in mevent_add_state() 306 if (type != EVF_TIMER && lp->me_fd == tfd && in mevent_add_state() 321 mevp->me_msecs = tfd; in mevent_add_state() 324 mevp->me_fd = tfd; in mevent_add_state() 353 mevent_add(int tfd, enum ev_type type, in mevent_add() argument 357 return (mevent_add_state(tfd, type, func, param, EV_ADD, 0)); in mevent_add() 361 mevent_add_flags(int tfd, enum ev_type type, int fflags, in mevent_add_flags() argument 365 return (mevent_add_state(tfd, type, func, param, EV_ADD, fflags)); in mevent_add_flags() [all …]
|
| H A D | pci_ahci.c | 167 uint32_t tfd; member 382 tfd &= 0x77; in ahci_write_fis_sdb() 386 fis[2] = tfd; in ahci_write_fis_sdb() 398 p->tfd |= tfd; in ahci_write_fis_sdb() 431 p->tfd = tfd; in ahci_write_fis_d2h() 1146 uint32_t tfd; in atapi_inquiry() local 1473 uint32_t tfd; in atapi_start_stop_unit() local 1497 uint32_t tfd; in atapi_mode_sense() local 1573 uint32_t tfd; in atapi_get_event_status_notification() local 1899 uint32_t tfd; in ata_ioreq_cb() local [all …]
|
| /freebsd-13.1/sys/contrib/dev/iwlwifi/pcie/ |
| H A D | tx-gen2.c | 44 struct iwl_tfh_tfd *tfd; in iwl_pcie_gen2_enqueue_hcmd() local 117 tfd = iwl_txq_get_tfd(trans, txq, txq->write_ptr); in iwl_pcie_gen2_enqueue_hcmd() 118 memset(tfd, 0, sizeof(*tfd)); in iwl_pcie_gen2_enqueue_hcmd() 198 iwl_txq_gen2_set_tb(trans, tfd, iwl_txq_get_first_tb_dma(txq, idx), in iwl_pcie_gen2_enqueue_hcmd() 209 iwl_txq_gen2_tfd_unmap(trans, out_meta, tfd); in iwl_pcie_gen2_enqueue_hcmd() 212 iwl_txq_gen2_set_tb(trans, tfd, phys_addr, in iwl_pcie_gen2_enqueue_hcmd() 231 iwl_txq_gen2_tfd_unmap(trans, out_meta, tfd); in iwl_pcie_gen2_enqueue_hcmd() 234 iwl_txq_gen2_set_tb(trans, tfd, phys_addr, cmdlen[i]); in iwl_pcie_gen2_enqueue_hcmd()
|
| H A D | tx.c | 143 struct iwl_tfd *tfd_fh = (void *)tfd; in iwl_pcie_tfd_set_tb() 159 void *tfd; in iwl_pcie_txq_build_tfd() local 162 tfd = (u8 *)txq->tfds + trans->txqs.tfd.size * txq->write_ptr; in iwl_pcie_txq_build_tfd() 165 memset(tfd, 0, trans->txqs.tfd.size); in iwl_pcie_txq_build_tfd() 170 if (num_tbs >= trans->txqs.tfd.max_tbs) { in iwl_pcie_txq_build_tfd() 172 trans->txqs.tfd.max_tbs); in iwl_pcie_txq_build_tfd() 279 trans->txqs.tfd.size * in iwl_pcie_txq_free() 1322 trans->txqs.tfd.size, in iwl_fill_data_tbs_amsdu() 1453 void *tfd; in iwl_trans_pcie_tx() local 1569 trans->txqs.tfd.size, in iwl_trans_pcie_tx() [all …]
|
| /freebsd-13.1/sys/contrib/dev/iwlwifi/ |
| H A D | iwl-trans.c | 46 trans->txqs.tfd.addr_size = 64; in iwl_trans_alloc() 47 trans->txqs.tfd.max_tbs = IWL_TFH_NUM_TBS; in iwl_trans_alloc() 48 trans->txqs.tfd.size = sizeof(struct iwl_tfh_tfd); in iwl_trans_alloc() 50 trans->txqs.tfd.addr_size = 36; in iwl_trans_alloc() 51 trans->txqs.tfd.max_tbs = IWL_NUM_OF_TBS; in iwl_trans_alloc() 52 trans->txqs.tfd.size = sizeof(struct iwl_tfd); in iwl_trans_alloc() 103 WARN_ON(trans->txqs.tfd.addr_size != in iwl_trans_init()
|
| /freebsd-13.1/lib/libutil/ |
| H A D | gr_util.c | 133 int tfd; in gr_tmp() local 146 if ((tfd = mkostemp(tempname, 0)) == -1) in gr_tmp() 150 if (write(tfd, buf, (size_t)nr) != nr) in gr_tmp() 155 close(tfd); in gr_tmp() 159 return (tfd); in gr_tmp() 248 if (write(tfd, p, q -p + 1) != q - p + 1) in gr_copy() 270 if (write(tfd, p, q - p + 1) != q - p + 1) in gr_copy() 286 if (write(tfd, line, len) != (int) len) in gr_copy() 294 if (write(tfd, q, end - q) != end - q) in gr_copy() 315 if ((size_t)write(tfd, line, len) != len || in gr_copy() [all …]
|
| H A D | pw_util.c | 213 int tfd; in pw_tmp() local 226 if ((tfd = mkostemp(tempname, 0)) == -1) in pw_tmp() 230 if (write(tfd, buf, (size_t)nr) != nr) in pw_tmp() 235 close(tfd); in pw_tmp() 239 return (tfd); in pw_tmp() 510 if (write(tfd, p, q - p + 1) != q - p + 1) in pw_copy() 533 if (write(tfd, p, q - p + 1) != q - p + 1) in pw_copy() 549 if (write(tfd, line, len) != (int)len) in pw_copy() 557 if (write(tfd, q, end - q) != end - q) in pw_copy() 578 if ((size_t)write(tfd, line, len) != len || in pw_copy() [all …]
|
| /freebsd-13.1/usr.sbin/vipw/ |
| H A D | vipw.c | 71 int ch, pfd, tfd; in main() local 97 if ((tfd = pw_tmp(pfd)) == -1) { in main() 101 (void)close(tfd); in main()
|
| /freebsd-13.1/usr.sbin/lpr/lpr/ |
| H A D | lpr.c | 105 static int tfd; /* control file descriptor */ variable 330 tfd = nfile(tfname); in main() 332 (void) fchown(tfd, pp->daemon_user, -1); in main() 498 (void) close(tfd); in main() 504 if ((tfd = open(tfname, O_RDWR)) >= 0) { in main() 507 if (read(tfd, &touch_c, 1) == 1 && in main() 508 lseek(tfd, (off_t)0, 0) == 0 && in main() 509 write(tfd, &touch_c, 1) != 1) { in main() 515 (void) close(tfd); in main() 631 write(tfd, buf, len); in card()
|
| /freebsd-13.1/usr.bin/chpass/ |
| H A D | chpass.c | 85 int ch, pfd, tfd; in main() local 213 if ((tfd = pw_tmp(-1)) == -1) { in main() 267 if ((tfd = pw_tmp(-1)) == -1) { in main() 271 if (pw_copy(pfd, tfd, pw, old_pw) == -1) { in main()
|
| /freebsd-13.1/contrib/file/src/ |
| H A D | compress.c | 450 int tfd; in file_pipe2file() local 456 tfd = open(ptr, O_RDWR|O_TRUNC|O_EXCL|O_CREAT, 0600); in file_pipe2file() 465 tfd = mkstemp(buf); in file_pipe2file() 472 if (tfd == -1) { in file_pipe2file() 478 if (swrite(tfd, startbuf, nbytes) != CAST(ssize_t, nbytes)) in file_pipe2file() 482 if (swrite(tfd, buf, CAST(size_t, r)) != r) in file_pipe2file() 502 if ((fd = dup2(tfd, fd)) == -1) { in file_pipe2file() 506 (void)close(tfd); in file_pipe2file()
|
| /freebsd-13.1/sys/fs/tmpfs/ |
| H A D | tmpfs_vfsops.c | 580 struct tmpfs_fid_data tfd; in tmpfs_fhtovp() local 585 if (fhp->fid_len != sizeof(tfd)) in tmpfs_fhtovp() 592 memcpy(&tfd, fhp->fid_data, fhp->fid_len); in tmpfs_fhtovp() 596 if (tfd.tfd_id >= tmp->tm_nodes_max) in tmpfs_fhtovp() 601 if (node->tn_id == tfd.tfd_id && in tmpfs_fhtovp() 602 node->tn_gen == tfd.tfd_gen) { in tmpfs_fhtovp()
|