/freebsd/tests/sys/file/ |
H A D | flock_helper.c | 187 struct flock fl; in test2() local 194 fl.l_start = 0; in test2() 195 fl.l_len = 0; in test2() 196 fl.l_type = F_WRLCK; in test2() 197 fl.l_whence = SEEK_SET; in test2() 209 if (fcntl(fd, F_SETLK, &fl) < 0) in test2() 229 res = fcntl(fd, F_SETLK, &fl); in test2() 258 struct flock fl; in test3() local 265 fl.l_start = 0; in test3() 266 fl.l_len = 0; in test3() [all …]
|
/freebsd/tests/sys/fs/fusefs/ |
H A D | locks.cc | 219 struct flock fl; in TEST_F() local 227 fl.l_start = 10; in TEST_F() 228 fl.l_len = 1000; in TEST_F() 229 fl.l_pid = 0; in TEST_F() 230 fl.l_type = F_RDLCK; in TEST_F() 231 fl.l_whence = SEEK_SET; in TEST_F() 232 fl.l_sysid = 0; in TEST_F() 233 ASSERT_NE(-1, fcntl(fd, F_GETLK, &fl)) << strerror(errno); in TEST_F() 246 struct flock fl; in TEST_F() local 277 fl.l_start = 10; in TEST_F() [all …]
|
/freebsd/usr.sbin/rpc.lockd/ |
H A D | lockd_lock.c | 154 enum partialfilelock_status lock_partialfilelock(struct file_lock *fl); 156 void send_granted(struct file_lock *fl, int opcode); 168 void deallocate_file_lock(struct file_lock *fl); 169 void fill_file_lock(struct file_lock *fl, const fhandle_t *fh, 187 void dump_filelock(const struct file_lock *fl); 188 struct file_lock * get_lock_matching_unlock(const struct file_lock *fl); 189 enum nfslock_status test_nfslock(const struct file_lock *fl, 191 enum nfslock_status lock_nfslock(struct file_lock *fl); 192 enum nfslock_status delete_nfslock(struct file_lock *fl); 193 enum nfslock_status unlock_nfslock(const struct file_lock *fl, [all …]
|
/freebsd/tests/sys/mac/portacl/ |
H A D | nobody_test.sh | 17 bind_test fl fl uid nobody tcp 77 19 bind_test fl fl uid nobody udp 77 22 bind_test fl fl gid nobody tcp 77 24 bind_test fl fl gid nobody udp 77 29 bind_test fl fl uid nobody tcp 77 31 bind_test fl fl uid nobody udp 77 34 bind_test fl fl gid nobody tcp 77 36 bind_test fl fl gid nobody udp 77 43 bind_test fl fl uid nobody tcp 77 44 bind_test fl ok uid nobody tcp 7777 [all …]
|
H A D | root_test.sh | 28 bind_test fl ok uid root tcp 77 30 bind_test fl ok uid root udp 77 33 bind_test fl ok gid root tcp 77 35 bind_test fl ok gid root udp 77 42 bind_test fl ok uid root tcp 77 43 bind_test fl ok uid root tcp 7777 44 bind_test fl ok uid root udp 77 45 bind_test fl ok uid root udp 7777 47 bind_test fl ok gid root tcp 77 48 bind_test fl ok gid root tcp 7777 [all …]
|
/freebsd/lib/libc/sys/ |
H A D | lockf.c | 43 struct flock fl; in lockf() local 46 fl.l_start = 0; in lockf() 47 fl.l_len = size; in lockf() 48 fl.l_whence = SEEK_CUR; in lockf() 53 fl.l_type = F_UNLCK; in lockf() 57 fl.l_type = F_WRLCK; in lockf() 61 fl.l_type = F_WRLCK; in lockf() 64 fl.l_type = F_WRLCK; in lockf() 67 (filedes, F_GETLK, &fl) == -1) in lockf() 69 if (fl in lockf() [all...] |
/freebsd/sys/geom/vinum/ |
H A D | geom_vinum_subr.c | 570 struct gv_freelist *fl, *fl2; in gv_sd_to_drive() local 606 LIST_FOREACH(fl, &d->freelist, freelist) { in gv_sd_to_drive() 607 if (fl->size < s->size) in gv_sd_to_drive() 609 s->size = fl->size; in gv_sd_to_drive() 610 s->drive_offset = fl->offset; in gv_sd_to_drive() 611 fl2 = fl; in gv_sd_to_drive() 627 LIST_FOREACH(fl, &d->freelist, freelist) { in gv_sd_to_drive() 628 if (fl->size < s->size) in gv_sd_to_drive() 632 s->drive_offset = fl->offset; in gv_sd_to_drive() 633 fl2 = fl; in gv_sd_to_drive() [all …]
|
/freebsd/sys/nlm/ |
H A D | nlm_advlock.c | 77 struct vnode *vp, int op, struct flock *fl, int flags, 81 struct vnode *vp, int op, struct flock *fl, int flags, 85 struct vnode *vp, int op, struct flock *fl, int flags, 90 static int nlm_init_lock(struct flock *fl, int flags, int svid, 194 nlm_advlock_internal(struct vnode *vp, void *id, int op, struct flock *fl, in nlm_advlock_internal() argument 270 KASSERT(fl->l_start == 0 && fl->l_len == 0, in nlm_advlock_internal() 286 svid = fl->l_pid; in nlm_advlock_internal() 294 && fl->l_type == F_WRLCK) { in nlm_advlock_internal() 307 vp, F_SETLK, fl, flags & ~F_WAIT, in nlm_advlock_internal() 310 fl->l_type = F_UNLCK; in nlm_advlock_internal() [all …]
|
/freebsd/usr.bin/sort/ |
H A D | file.c | 205 file_list_init(struct file_list *fl, bool tmp) in file_list_init() argument 208 if (fl) { in file_list_init() 209 memset(fl, 0, sizeof(*fl)); in file_list_init() 210 fl->tmp = tmp; in file_list_init() 218 file_list_add(struct file_list *fl, const char *fn, bool allocate) in file_list_add() argument 221 if (fl && fn) { in file_list_add() 222 if (fl->count >= fl->sz || (fl->fns == NULL)) { in file_list_add() 223 fl->sz = (fl->sz) * 2 + 1; in file_list_add() 224 fl->fns = sort_realloc(fl->fns, fl->sz * in file_list_add() 227 fl->fns[fl->count] = allocate ? sort_strdup(fn) : fn; in file_list_add() [all …]
|
H A D | file.h | 109 void file_list_init(struct file_list *fl, bool tmp); 110 void file_list_add(struct file_list *fl, const char *fn, bool allocate); 111 void file_list_populate(struct file_list *fl, int argc, char **argv, bool allocate); 112 void file_list_clean(struct file_list *fl); 115 void merge_files(struct file_list *fl, const char *fn_out); 118 int procfile(const char *fn, struct sort_list *list, struct file_list *fl);
|
/freebsd/contrib/capsicum-test/ |
H A D | fcntl.cc | 197 struct flock fl; in TEST() local 198 memset(&fl, 0, sizeof(fl)); in TEST() 199 fl.l_type = F_RDLCK; in TEST() 200 fl.l_whence = SEEK_SET; in TEST() 201 fl.l_start = 0; in TEST() 202 fl.l_len = 1; in TEST() 203 EXPECT_EQ(0, CHECK_FCNTL(CAP_FLOCK, caps, F_GETLK, (long)&fl)); in TEST() 224 struct flock fl; in TEST() local 225 memset(&fl, 0, sizeof(fl)); in TEST() 226 fl.l_type = F_WRLCK; in TEST() [all …]
|
/freebsd/sys/vm/ |
H A D | vm_phys.c | 189 static void vm_phys_split_pages(vm_page_t m, int oind, struct vm_freelist *fl, 280 struct vm_freelist *fl; in sysctl_vm_phys_free() local 303 fl = vm_phys_free_queues[dom][flind][pind]; in sysctl_vm_phys_free() 305 fl[oind].lcnt); in sysctl_vm_phys_free() 394 vm_freelist_add(struct vm_freelist *fl, vm_page_t m, int order, int tail) in vm_freelist_add() argument 399 TAILQ_INSERT_TAIL(&fl[order].pl, m, listq); in vm_freelist_add() 401 TAILQ_INSERT_HEAD(&fl[order].pl, m, listq); in vm_freelist_add() 402 fl[order].lcnt++; in vm_freelist_add() 406 vm_freelist_rem(struct vm_freelist *fl, vm_page_t m, int order) in vm_freelist_rem() argument 409 TAILQ_REMOVE(&fl[order].pl, m, listq); in vm_freelist_rem() [all …]
|
/freebsd/contrib/netbsd-tests/net/net/ |
H A D | t_tcp.c | 77 int ok, fl; in paccept_block() local 121 fl = fcntl(srvr, F_GETFL, 0); in paccept_block() 122 if (fl == -1) in paccept_block() 125 ok = fcntl(srvr, F_SETFL, fl & ~O_NONBLOCK); in paccept_block() 136 fl = fcntl(as, F_GETFL, 0); in paccept_block() 137 if (fl == -1) in paccept_block() 139 if (fl != (O_RDWR|O_NONBLOCK)) in paccept_block() 140 FAIL("fl 0x%x != 0x%x\n", fl, O_RDWR|O_NONBLOCK); in paccept_block() 141 ok = fcntl(as, F_SETFL, fl & ~O_NONBLOCK); in paccept_block() 145 fl = fcntl(as, F_GETFL, 0); in paccept_block() [all …]
|
/freebsd/contrib/nvi/ex/ |
H A D | ex_move.c | 87 recno_t cnt, diff, fl, tl, mfl, mtl; in ex_move() local 117 fl = fm1.lno; in ex_move() 124 lmp->lno >= fl && lmp->lno <= tl) { in ex_move() 135 if (tl > fl) { /* Destination > source. */ in ex_move() 139 if (db_get(sp, fl, DBG_FATAL, &p, &len)) in ex_move() 148 lmp->lno == fl) in ex_move() 150 if (db_delete(sp, fl)) in ex_move() 157 if (db_get(sp, fl, DBG_FATAL, &p, &len)) in ex_move() 166 lmp->lno == fl) in ex_move() 168 ++fl; in ex_move() [all …]
|
/freebsd/sys/net/ |
H A D | iflib.c | 843 iflib_fl_t fl = &rxq->ifr_fl[0]; in iflib_netmap_config() local 849 info->rx_buf_maxsize = fl->ifl_buf_size; in iflib_netmap_config() 866 iflib_fl_t fl = &rxq->ifr_fl[0]; in netmap_fl_refill() local 901 map = fl->ifl_sds.ifsd_map; in netmap_fl_refill() 902 nic_i = fl->ifl_pidx; in netmap_fl_refill() 930 fl->ifl_bus_addrs[i] = paddr + in netmap_fl_refill() 932 fl->ifl_rxd_idxs[i] = nic_i; in netmap_fl_refill() 935 netmap_load_map(na, fl->ifl_buf_tag, in netmap_fl_refill() 939 netmap_reload_map(na, fl->ifl_buf_tag, in netmap_fl_refill() 942 bus_dmamap_sync(fl->ifl_buf_tag, map[nic_i], in netmap_fl_refill() [all …]
|
/freebsd/crypto/openssh/openbsd-compat/ |
H A D | bsd-flock.c | 49 struct flock fl = {0}; in flock() local 53 fl.l_type = F_WRLCK; in flock() 57 fl.l_type = F_RDLCK; in flock() 61 fl.l_type = F_UNLCK; in flock() 69 fl.l_whence = SEEK_SET; in flock() 70 rc = fcntl(fd, op & LOCK_NB ? F_SETLK : F_SETLKW, &fl); in flock()
|
/freebsd/contrib/llvm-project/lldb/source/Host/posix/ |
H A D | LockFilePosix.cpp | 21 struct flock fl; in fileLock() local 23 fl.l_type = lock_type; in fileLock() 24 fl.l_whence = SEEK_SET; in fileLock() 25 fl.l_start = start; in fileLock() 26 fl.l_len = len; in fileLock() 27 fl.l_pid = ::getpid(); in fileLock() 30 if (llvm::sys::RetryAfterSignal(-1, ::fcntl, fd, cmd, &fl) == -1) in fileLock()
|
/freebsd/sys/contrib/openzfs/include/os/linux/spl/sys/ |
H A D | vmem.h | 90 #define vmem_alloc(sz, fl) spl_vmem_alloc((sz), (fl), __func__, __LINE__) argument 91 #define vmem_zalloc(sz, fl) spl_vmem_zalloc((sz), (fl), __func__, __LINE__) argument 94 extern void *spl_vmem_alloc(size_t sz, int fl, const char *func, int line) 96 extern void *spl_vmem_zalloc(size_t sz, int fl, const char *func, int line)
|
/freebsd/sys/dev/cxgbe/ |
H A D | t4_sge.c | 1553 move_to_next_rxbuf(struct sge_fl *fl) in move_to_next_rxbuf() argument 1556 fl->rx_offset = 0; in move_to_next_rxbuf() 1557 if (__predict_false((++fl->cidx & 7) == 0)) { in move_to_next_rxbuf() 1558 uint16_t cidx = fl->cidx >> 3; in move_to_next_rxbuf() 1560 if (__predict_false(cidx == fl->sidx)) in move_to_next_rxbuf() 1561 fl->cidx = cidx = 0; in move_to_next_rxbuf() 1562 fl->hw_cidx = cidx; in move_to_next_rxbuf() 1573 struct sge_fl *fl; in service_iq_fl() local 1608 fl = &rxq->fl; in service_iq_fl() 1609 fl_hw_cidx = fl->hw_cidx; /* stable snapshot */ in service_iq_fl() [all …]
|
/freebsd/sbin/ipf/ipf/ |
H A D | ipf.c | 345 int fl = 0, rem; in flushfilter() local 351 fl = 0; in flushfilter() 353 fl = 1; in flushfilter() 355 fl = atoi(arg); in flushfilter() 356 rem = fl; in flushfilter() 375 fl = -1; in flushfilter() 377 fl = obj.ipfo_retval; in flushfilter() 380 if (ioctl(fd, SIOCIPFFL, &fl) == -1) { in flushfilter() 390 printf("%d state entries removed\n", fl); in flushfilter() 395 fl = FR_INQUE; in flushfilter() [all …]
|
/freebsd/tools/test/stress2/misc/ |
H A D | rename15.sh | 40 fl=$newfs_flags 41 fl='-j' 42 [ $fl = "-U" -a `jot -r 1 0 1` -eq 1 ] && fl="-j" 43 echo "newfs $fl md$mdstart" 44 newfs $fl md$mdstart > /dev/null
|
H A D | fcntl.sh | 82 struct flock fl; 89 memset(&fl, 0, sizeof(fl)); 90 fl.l_start = pos; 91 fl.l_len = sizeof(val); 92 fl.l_type = F_WRLCK; 93 fl.l_whence = SEEK_SET; 95 while (fcntl(fd, F_SETLK, &fl) < 0) { 124 fl.l_type = F_UNLCK; 125 if (fcntl(fd, F_SETLK, &fl) < 0)
|
H A D | nullfs22.sh | 103 struct flock fl; 109 memset(&fl, 0, sizeof(fl)); 110 fl.l_start = pos; 111 fl.l_len = sizeof(val); 112 fl.l_type = F_WRLCK; 113 fl.l_whence = SEEK_SET; 115 while (fcntl(fd, F_SETLKW, &fl) < 0) { 145 fl.l_type = F_UNLCK; 146 if (fcntl(fd, F_SETLK, &fl) < 0)
|
H A D | exlock2.sh | 114 struct flock fl; 126 memset(&fl, 0, sizeof(fl)); 127 fl.l_start = 0; 128 fl.l_len = 0; 129 fl.l_type = F_WRLCK; 130 fl.l_whence = SEEK_SET; 131 if (fcntl(fd, F_SETLK, &fl) < 0) {
|
/freebsd/contrib/sendmail/src/ |
H A D | tls.h | 104 # define DANEMODE(fl) ((fl) & 0x3) argument 135 # define TLSA_SET_FL(dane_tlsa, fl) (dane_tlsa)->dane_tlsa_flags |= (fl) argument 136 # define TLSA_CLR_FL(dane_tlsa, fl) (dane_tlsa)->dane_tlsa_flags &= ~(fl) argument 137 # define TLSA_IS_FL(dane_tlsa, fl) (((dane_tlsa)->dane_tlsa_flags & (fl)) != 0) argument 142 # define TLSA_STORE_FL(fl) ((fl) >= TLSAFLTEMP) argument
|