Home
last modified time | relevance | path

Searched refs:tfd (Results 1 – 25 of 42) sorted by relevance

12

/freebsd/sys/kern/
H A Dsys_timerfd.c210 error = mtx_sleep(&tfd->tfd_count, &tfd->tfd_lock, in timerfd_read()
258 tfd->tfd_count > 0 && tfd->tfd_jumped != TFD_READ) in timerfd_poll()
302 kn->kn_hook = tfd; in timerfd_kqfilter()
399 ++tfd->tfd_count; in timerfd_expire()
410 &tfd->tfd_time.it_interval, &tfd->tfd_time.it_value); in timerfd_expire()
462 tfd = malloc(sizeof(*tfd), M_TIMERFD, M_WAITOK | M_ZERO); in kern_timerfd_create()
467 callout_init_mtx(&tfd->tfd_callout, &tfd->tfd_lock, 0); in kern_timerfd_create()
468 knlist_init_mtx(&tfd->tfd_sel.si_note, &tfd->tfd_lock); in kern_timerfd_create()
497 tfd = fp->f_data; in kern_timerfd_gettime()
529 tfd = fp->f_data; in kern_timerfd_settime()
[all …]
/freebsd/contrib/netbsd-tests/rump/rumpvfs/
H A Dt_etfs.c66 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/sbin/ipf/libipf/
H A Dipft_hx.c23 static int tfd = -1; variable
28 if (tfp && tfd != -1) { in hex_open()
30 return (tfd); in hex_open()
34 tfd = 0; in hex_open()
37 tfd = open(fname, O_RDONLY); in hex_open()
38 if (tfd != -1) in hex_open()
39 tfp = fdopen(tfd, "r"); in hex_open()
41 return (tfd); in hex_open()
48 int cfd = tfd; in hex_close()
50 tfd = -1; in hex_close()
H A Dipft_tx.c29 static int tfd = -1; variable
84 if (tfp && tfd != -1) { in text_open()
86 return (tfd); in text_open()
90 tfd = 0; in text_open()
93 tfd = open(fname, O_RDONLY); in text_open()
94 if (tfd != -1) in text_open()
95 tfp = fdopen(tfd, "r"); in text_open()
97 return (tfd); in text_open()
104 int cfd = tfd; in text_close()
106 tfd = -1; in text_close()
/freebsd/sys/contrib/dev/iwlwifi/queue/
H A Dtx.c119 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()
664 memset(tfd, 0, sizeof(*tfd)); in iwl_txq_gen2_build_tfd()
725 void *tfd; in iwl_txq_gen2_tx() local
774 if (!tfd) { in iwl_txq_gen2_tx()
1377 tfd = _tfd; in iwl_txq_gen1_tfd_tb_get_addr()
[all …]
H A Dtx.h44 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/sys/contrib/openzfs/tests/zfs-tests/cmd/
H A Dcp_files.c14 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/tools/test/stress2/testcases/openat/
H A Dopenat.c117 int tfd; in test_openat() local
124 if ((tfd = openat(fd, file, O_RDONLY|O_CREAT, 0660)) == -1) in test_openat()
126 close(tfd); in test_openat()
139 int tfd; in test_renameat() local
146 if ((tfd = openat(fd, file, O_RDONLY|O_CREAT, 0660)) == -1) in test_renameat()
148 close(tfd); in test_renameat()
165 int tfd; in test_unlinkat() local
171 if ((tfd = openat(fd, file, O_RDONLY|O_CREAT, 0660)) == -1) in test_unlinkat()
173 close(tfd); in test_unlinkat()
/freebsd/contrib/libbegemot/
H A Drpoll.c432 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/usr.sbin/pw/
H A Dgrupd.c51 int pfd, tfd; in gr_update() local
68 if ((tfd = gr_tmp(-1)) == -1) { in gr_update()
72 if (gr_copy(pfd, tfd, gr, old_gr) == -1) { in gr_update()
74 close(tfd); in gr_update()
77 fsync(tfd); in gr_update()
78 close(tfd); in gr_update()
H A Dpw_nis.c41 int pfd, tfd; in pw_nisupdate() local
58 if ((tfd = pw_tmp(-1)) == -1) { in pw_nisupdate()
62 if (pw_copy(pfd, tfd, pw, old_pw) == -1) { in pw_nisupdate()
64 close(tfd); in pw_nisupdate()
67 fsync(tfd); in pw_nisupdate()
68 close(tfd); in pw_nisupdate()
H A Dpwupd.c88 int rc, pfd, tfd; in pw_update() local
105 if ((tfd = pw_tmp(-1)) == -1) { in pw_update()
109 if (pw_copy(pfd, tfd, pw, old_pw) == -1) { in pw_update()
111 close(tfd); in pw_update()
114 fsync(tfd); in pw_update()
115 close(tfd); in pw_update()
/freebsd/contrib/mandoc/
H A Dterm_tag.c55 int tfd; in term_tag_init() local
57 ofd = tfd = -1; in term_tag_init()
110 if ((tfd = mkstemp(tag_files.tfn)) == -1) { in term_tag_init()
119 tfd = open(tagfilename, O_WRONLY | O_CREAT | O_EXCL, 0644); in term_tag_init()
120 if (tfd == -1) { in term_tag_init()
126 if ((tag_files.tfs = fdopen(tfd, "w")) == NULL) { in term_tag_init()
130 tfd = -1; in term_tag_init()
142 if (tfd != -1) in term_tag_init()
143 close(tfd); in term_tag_init()
/freebsd/usr.sbin/bhyve/
H A Dmevent.c283 mevent_add_state(int tfd, enum ev_type type, in mevent_add_state() argument
291 if (tfd < 0 || func == NULL) { in mevent_add_state()
305 if (type != EVF_TIMER && lp->me_fd == tfd && in mevent_add_state()
312 if (type != EVF_TIMER && lp->me_fd == tfd && in mevent_add_state()
327 mevp->me_msecs = tfd; in mevent_add_state()
330 mevp->me_fd = tfd; in mevent_add_state()
359 mevent_add(int tfd, enum ev_type type, in mevent_add() argument
363 return (mevent_add_state(tfd, type, func, param, EV_ADD, 0)); in mevent_add()
367 mevent_add_flags(int tfd, enum ev_type type, int fflags, in mevent_add_flags() argument
371 return (mevent_add_state(tfd, type, func, param, EV_ADD, fflags)); in mevent_add_flags()
[all …]
H A Dpci_ahci.c162 uint32_t tfd; member
377 tfd &= 0x77; in ahci_write_fis_sdb()
381 fis[2] = tfd; in ahci_write_fis_sdb()
393 p->tfd |= tfd; in ahci_write_fis_sdb()
426 p->tfd = tfd; in ahci_write_fis_d2h()
1145 uint32_t tfd; in atapi_inquiry() local
1474 uint32_t tfd; in atapi_start_stop_unit() local
1498 uint32_t tfd; in atapi_mode_sense() local
1574 uint32_t tfd; in atapi_get_event_status_notification() local
1900 uint32_t tfd; in ata_ioreq_cb() local
[all …]
/freebsd/sys/contrib/dev/iwlwifi/pcie/
H A Dtx-gen2.c44 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 Dtx.c143 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
1572 trans->txqs.tfd.size, in iwl_trans_pcie_tx()
[all …]
/freebsd/sys/contrib/dev/iwlwifi/
H A Diwl-trans.c46 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/lib/libutil/
H A Dgr_util.c130 int tfd; in gr_tmp() local
143 if ((tfd = mkostemp(tempname, 0)) == -1) in gr_tmp()
147 if (write(tfd, buf, (size_t)nr) != nr) in gr_tmp()
152 close(tfd); in gr_tmp()
156 return (tfd); in gr_tmp()
245 if (write(tfd, p, q -p + 1) != q - p + 1) in gr_copy()
267 if (write(tfd, p, q - p + 1) != q - p + 1) in gr_copy()
283 if (write(tfd, line, len) != (int) len) in gr_copy()
291 if (write(tfd, q, end - q) != end - q) in gr_copy()
312 if ((size_t)write(tfd, line, len) != len || in gr_copy()
[all …]
H A Dpw_util.c210 int tfd; in pw_tmp() local
223 if ((tfd = mkostemp(tempname, 0)) == -1) in pw_tmp()
227 if (write(tfd, buf, (size_t)nr) != nr) in pw_tmp()
232 close(tfd); in pw_tmp()
236 return (tfd); in pw_tmp()
507 if (write(tfd, p, q - p + 1) != q - p + 1) in pw_copy()
530 if (write(tfd, p, q - p + 1) != q - p + 1) in pw_copy()
546 if (write(tfd, line, len) != (int)len) in pw_copy()
554 if (write(tfd, q, end - q) != end - q) in pw_copy()
575 if ((size_t)write(tfd, line, len) != len || in pw_copy()
[all …]
/freebsd/usr.sbin/vipw/
H A Dvipw.c57 int ch, pfd, tfd; in main() local
83 if ((tfd = pw_tmp(pfd)) == -1) { in main()
87 (void)close(tfd); in main()
/freebsd/usr.sbin/lpr/lpr/
H A Dlpr.c90 static int tfd; /* control file descriptor */ variable
315 tfd = nfile(tfname); in main()
317 (void) fchown(tfd, pp->daemon_user, -1); in main()
483 (void) close(tfd); in main()
489 if ((tfd = open(tfname, O_RDWR)) >= 0) { in main()
492 if (read(tfd, &touch_c, 1) == 1 && in main()
493 lseek(tfd, (off_t)0, 0) == 0 && in main()
494 write(tfd, &touch_c, 1) != 1) { in main()
500 (void) close(tfd); in main()
616 write(tfd, buf, len); in card()
/freebsd/tools/test/stress2/testcases/rename/
H A Drename.c95 int tfd; in test_rename() local
100 if ((tfd = open(file1, O_RDONLY|O_CREAT, 0660)) == -1) in test_rename()
102 close(tfd); in test_rename()
/freebsd/usr.bin/chpass/
H A Dchpass.c71 int ch, pfd, tfd; in main() local
199 if ((tfd = pw_tmp(-1)) == -1) { in main()
253 if ((tfd = pw_tmp(-1)) == -1) { in main()
257 if (pw_copy(pfd, tfd, pw, old_pw) == -1) { in main()
/freebsd/sys/fs/tmpfs/
H A Dtmpfs_vfsops.c588 struct tmpfs_fid_data tfd; in tmpfs_fhtovp() local
593 if (fhp->fid_len != sizeof(tfd)) in tmpfs_fhtovp()
600 memcpy(&tfd, fhp->fid_data, fhp->fid_len); in tmpfs_fhtovp()
604 if (tfd.tfd_id >= tmp->tm_nodes_max) in tmpfs_fhtovp()
609 if (node->tn_id == tfd.tfd_id && in tmpfs_fhtovp()
610 node->tn_gen == tfd.tfd_gen) { in tmpfs_fhtovp()

12