Home
last modified time | relevance | path

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

12

/freebsd/sys/kern/
H A Dsys_timerfd.c134 struct timerfd *tfd; in timerfd_jumped() local
142 LIST_FOREACH(tfd, &timerfd_list, entry) { in timerfd_jumped()
143 mtx_lock(&tfd->tfd_lock); in timerfd_jumped()
144 if (tfd->tfd_clockid != CLOCK_REALTIME || in timerfd_jumped()
145 (tfd->tfd_timflags & TFD_TIMER_ABSTIME) == 0 || in timerfd_jumped()
146 timespeccmp(&boottime, &tfd->tfd_boottim, ==)) { in timerfd_jumped()
147 mtx_unlock(&tfd->tfd_lock); in timerfd_jumped()
151 if (callout_active(&tfd->tfd_callout)) { in timerfd_jumped()
152 if ((tfd->tfd_timflags & TFD_TIMER_CANCEL_ON_SET) != 0) in timerfd_jumped()
153 tfd->tfd_jumped = TFD_CANCELED; in timerfd_jumped()
[all …]
/freebsd/contrib/netbsd-tests/rump/rumpvfs/
H A Dt_etfs.c66 int tfd; in ATF_TC_BODY() local
81 tfd = rump_sys_open(TESTPATH1, O_RDONLY); in ATF_TC_BODY()
82 ATF_REQUIRE(tfd != -1); in ATF_TC_BODY()
83 ATF_REQUIRE(rump_sys_read(tfd, buf, sizeof(buf)) > 0); in ATF_TC_BODY()
84 rump_sys_close(tfd); in ATF_TC_BODY()
89 tfd = rump_sys_open(TESTPATH2, O_RDWR); in ATF_TC_BODY()
90 ATF_REQUIRE(tfd != -1); in ATF_TC_BODY()
92 ATF_REQUIRE((n = rump_sys_read(tfd, buf, sizeof(buf))) > 0); in ATF_TC_BODY()
98 ATF_REQUIRE_EQ(rump_sys_lseek(tfd, 0, SEEK_SET), 0); in ATF_TC_BODY()
100 ATF_REQUIRE_EQ(rump_sys_write(tfd, TESTSTR2, TESTSTR2SZ), TESTSTR2SZ); in ATF_TC_BODY()
[all …]
/freebsd/sys/contrib/dev/iwlwifi/pcie/gen1_2/
H A Dtx-gen2.c63 struct iwl_tfh_tfd *tfd, in iwl_txq_gen2_set_tb_with_wa() argument
76 ret = iwl_txq_gen2_set_tb(trans, tfd, phys, len); in iwl_txq_gen2_set_tb_with_wa()
131 ret = iwl_txq_gen2_set_tb(trans, tfd, phys, len); in iwl_txq_gen2_set_tb_with_wa()
161 struct iwl_tfh_tfd *tfd, in iwl_txq_gen2_build_amsdu() argument
179 trace_iwlwifi_dev_tx(trans->dev, skb, tfd, sizeof(*tfd), in iwl_txq_gen2_build_amsdu()
252 iwl_txq_gen2_set_tb(trans, tfd, tb_phys, tb_len); in iwl_txq_gen2_build_amsdu()
272 ret = iwl_txq_gen2_set_tb_with_wa(trans, skb, tfd, in iwl_txq_gen2_build_amsdu()
307 struct iwl_tfh_tfd *tfd = iwl_txq_get_tfd(trans, txq, idx); in iwl_txq_gen2_build_tx_amsdu() local
319 iwl_txq_gen2_set_tb(trans, tfd, tb_phys, IWL_FIRST_TB_SIZE); in iwl_txq_gen2_build_tx_amsdu()
341 iwl_txq_gen2_set_tb(trans, tfd, tb_phys, len); in iwl_txq_gen2_build_tx_amsdu()
[all …]
H A Dtx.c149 static inline void iwl_pcie_gen1_tfd_set_tb(struct iwl_tfd *tfd, in iwl_pcie_gen1_tfd_set_tb() argument
152 struct iwl_tfd_tb *tb = &tfd->tbs[idx]; in iwl_pcie_gen1_tfd_set_tb()
160 tfd->num_tbs = idx + 1; in iwl_pcie_gen1_tfd_set_tb()
163 static inline u8 iwl_txq_gen1_tfd_get_num_tbs(struct iwl_tfd *tfd) in iwl_txq_gen1_tfd_get_num_tbs() argument
165 return tfd->num_tbs & 0x1f; in iwl_txq_gen1_tfd_get_num_tbs()
172 void *tfd; in iwl_pcie_txq_build_tfd() local
175 tfd = (u8 *)txq->tfds + trans_pcie->txqs.tfd.size * txq->write_ptr; in iwl_pcie_txq_build_tfd()
178 memset(tfd, 0, trans_pcie->txqs.tfd.size); in iwl_pcie_txq_build_tfd()
180 num_tbs = iwl_txq_gen1_tfd_get_num_tbs(tfd); in iwl_pcie_txq_build_tfd()
183 if (num_tbs >= trans_pcie->txqs.tfd.max_tbs) { in iwl_pcie_txq_build_tfd()
[all …]
H A Dinternal.h318 } tfd; member
586 #define IWL_TRANS_PCIE_MAX_FRAGS(trans_pcie) ((trans_pcie)->txqs.tfd.max_tbs - 3)
669 return (u8 *)txq->tfds + trans_pcie->txqs.tfd.size * idx; in iwl_txq_get_tfd()
735 struct iwl_tfh_tfd *tfd, dma_addr_t addr,
739 struct iwl_tfh_tfd *tfd) in iwl_txq_set_tfd_invalid_gen2() argument
743 tfd->num_tbs = 0; in iwl_txq_set_tfd_invalid_gen2()
745 iwl_txq_gen2_set_tb(trans, tfd, trans_pcie->invalid_tx_cmd.dma, in iwl_txq_set_tfd_invalid_gen2()
751 struct iwl_tfh_tfd *tfd);
770 struct iwl_tfd *tfd; in iwl_txq_gen1_tfd_tb_get_len() local
780 tfd = (struct iwl_tfd *)_tfd; in iwl_txq_gen1_tfd_tb_get_len()
[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.c
H A Dtx.h
/freebsd/contrib/libbegemot/
H A Drpoll.c189 static int * tfd; /* sorted entries */ variable
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()
475 assert(pp - tfd == (ptrdiff_t)tims_used); in sort_timers()
479 qsort(tfd, tfd_used, sizeof(int), tim_cmp); in sort_timers()
524 i, tfd[i]->when - now); in poll_dispatch()
527 if((tout = tims[tfd[0]].when - now) < 0) in poll_dispatch()
616 if(tfd[i] < 0) in poll_dispatch()
[all …]
/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/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/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.c284 mevent_add_state(int tfd, enum ev_type type, in mevent_add_state() argument
292 if (tfd < 0 || func == NULL) { in mevent_add_state()
306 if (type != EVF_TIMER && lp->me_fd == tfd && in mevent_add_state()
313 if (type != EVF_TIMER && lp->me_fd == tfd && in mevent_add_state()
328 mevp->me_msecs = tfd; in mevent_add_state()
331 mevp->me_fd = tfd; in mevent_add_state()
360 mevent_add(int tfd, enum ev_type type, in mevent_add() argument
364 return (mevent_add_state(tfd, type, func, param, EV_ADD, 0)); in mevent_add()
368 mevent_add_flags(int tfd, enum ev_type type, int fflags, in mevent_add_flags() argument
372 return (mevent_add_state(tfd, type, func, param, EV_ADD, fflags)); in mevent_add_flags()
[all …]
H A Dpci_ahci.c163 uint32_t tfd; member
374 ahci_write_fis_sdb(struct ahci_port *p, int slot, uint8_t *cfis, uint32_t tfd) in ahci_write_fis_sdb() argument
379 error = (tfd >> 8) & 0xff; in ahci_write_fis_sdb()
380 tfd &= 0x77; in ahci_write_fis_sdb()
384 fis[2] = tfd; in ahci_write_fis_sdb()
388 p->err_cfis[2] = tfd; in ahci_write_fis_sdb()
395 p->tfd &= ~0x77; in ahci_write_fis_sdb()
396 p->tfd |= tfd; in ahci_write_fis_sdb()
401 ahci_write_fis_d2h(struct ahci_port *p, int slot, uint8_t *cfis, uint32_t tfd) in ahci_write_fis_d2h() argument
406 error = (tfd >> 8) & 0xff; in ahci_write_fis_d2h()
[all …]
/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()
164 gr_copy(int ffd, int tfd, const struct group *gr, struct group *old_gr) in gr_copy() argument
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()
[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()
426 pw_copy(int ffd, int tfd, const struct passwd *pw, struct passwd *old_pw) in pw_copy() argument
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()
[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()
596 tfd = (struct tmpfs_fid_data *)fhp; in tmpfs_fhtovp()
600 if (tfd->tfd_id >= tmp->tm_nodes_max) in tmpfs_fhtovp()
605 if (node->tn_id == tfd->tfd_id && in tmpfs_fhtovp()
606 node->tn_gen == tfd->tfd_gen) { in tmpfs_fhtovp()

12