/third_party/ltp/testcases/kernel/syscalls/fcntl/ |
D | fcntl14.c | 534 static struct flock flock; variable 614 flock.l_type = thiscase->c_type; in dochild() 615 flock.l_whence = thiscase->c_whence; in dochild() 616 flock.l_start = thiscase->c_start; in dochild() 617 flock.l_len = thiscase->c_len; in dochild() 618 flock.l_pid = 0; in dochild() 627 if ((rc = fcntl(fd, F_GETLK, &flock)) < 0) { in dochild() 634 if (flock.l_type != F_UNLCK) { in dochild() 638 flock.l_type, F_UNLCK); in dochild() 642 if (flock.l_whence != thiscase->c_whence) { in dochild() [all …]
|
D | fcntl13.c | 25 static struct flock flock; variable 30 struct flock *flock; member 35 {1, F_BADCMD, &flock, "F_BADCMD", EINVAL}, 36 {1, F_SETLK, &flock, "F_SETLK", EINVAL}, 37 {-1, F_GETLK, &flock, "F_GETLK", EBADF} 44 if (!tc->flock) in verify_fcntl() 45 tc->flock = tst_get_bad_addr(NULL); in verify_fcntl() 47 TST_EXP_FAIL2(fcntl(tc->fd, tc->cmd, tc->flock), tc->exp_errno, in verify_fcntl() 53 flock.l_whence = -1; in setup() 54 flock.l_type = F_WRLCK; in setup() [all …]
|
D | fcntl19.c | 68 void compare_lock(struct flock *, short, short, int, int, pid_t); 70 void do_test(struct flock *, short, short, int, int); 130 struct flock fl; in do_child() 144 struct flock fl; in do_lock() 153 void do_test(struct flock *fl, short type, short whence, int start, int len) in do_test() 166 compare_lock(struct flock *fl, short type, short whence, int start, int len, in compare_lock() 203 struct flock fl; in unlock_file() 230 void parent_put(struct flock *l) in parent_put() 238 void parent_get(struct flock *l) in parent_get() 246 void child_put(struct flock *l) in child_put() [all …]
|
D | fcntl20.c | 64 void compare_lock(struct flock *, short, short, int, int, pid_t); 66 void do_test(struct flock *, short, short, int, int); 127 struct flock fl; in do_child() 143 struct flock fl; in do_lock() 152 void do_test(struct flock *fl, short type, short whence, int start, int len) in do_test() 165 compare_lock(struct flock *fl, short type, short whence, int start, int len, in compare_lock() 202 struct flock fl; in unlock_file() 229 void parent_put(struct flock *l) in parent_put() 237 void parent_get(struct flock *l) in parent_get() 245 void child_put(struct flock *l) in child_put() [all …]
|
D | fcntl11.c | 64 void compare_lock(struct flock *, short, short, int, int, pid_t); 66 void do_test(struct flock *, short, short, int, int); 116 struct flock fl; in do_child() 130 struct flock fl; in do_lock() 139 void do_test(struct flock *fl, short type, short whence, int start, int len) in do_test() 152 compare_lock(struct flock *fl, short type, short whence, int start, int len, in compare_lock() 179 struct flock fl; in unlock_file() 204 void parent_put(struct flock *l) in parent_put() 209 void parent_get(struct flock *l) in parent_get() 214 void child_put(struct flock *l) in child_put() [all …]
|
D | fcntl_common.h | 14 #define FCNTL_COMPAT(fd, cmd, flock) \ argument 15 SAFE_FCNTL(fd, cmd, flock) 41 int fd, int cmd, struct flock *lck) in fcntl_compat() 71 #define FCNTL_COMPAT(fd, cmd, flock) \ argument 72 fcntl_compat(__FILE__, __LINE__, #cmd, fd, cmd, flock)
|
D | fcntl21.c | 63 void compare_lock(struct flock *, short, short, int, int, pid_t); 65 void do_test(struct flock *, short, short, int, int); 134 struct flock fl; in do_child() 151 struct flock fl; in do_lock() 160 void do_test(struct flock *fl, short type, short whence, int start, int len) in do_test() 173 compare_lock(struct flock *fl, short type, short whence, int start, int len, in compare_lock() 210 struct flock fl; in unlock_file() 237 void parent_put(struct flock *l) in parent_put() 245 void parent_get(struct flock *l) in parent_get() 253 void child_put(struct flock *l) in child_put() [all …]
|
D | fcntl17.c | 74 struct flock lock1 = { (short)F_WRLCK, (short)0, 2, 5, (short)0 }; 75 struct flock lock2 = { (short)F_WRLCK, (short)0, 9, 5, (short)0 }; 76 struct flock lock3 = { (short)F_WRLCK, (short)0, 17, 5, (short)0 }; 77 struct flock lock4 = { (short)F_WRLCK, (short)0, 17, 5, (short)0 }; 78 struct flock lock5 = { (short)F_WRLCK, (short)0, 2, 14, (short)0 }; 79 struct flock unlock = { (short)F_UNLCK, (short)0, 0, 0, (short)0 }; 91 int do_test(struct flock *, pid_t); 285 int do_test(struct flock *lock, pid_t pid) in do_test() 287 struct flock fl; in do_test()
|
D | fcntl16.c | 69 struct flock parent_a; 70 struct flock parent_b; 71 struct flock child_a; 72 struct flock child_b; 73 struct flock parent_c; 74 struct flock parent_d; 264 static struct flock *thislock;
|
D | fcntl18.c | 65 struct flock fl; in main() 83 retval = fcntl(fd, F_GETLK, (struct flock *)INVAL_FLAG); in main() 106 retval = fcntl(fd, F_GETLK, (struct flock *)INVAL_FLAG); in main()
|
/third_party/rust/crates/rustix/tests/fs/ |
D | flock.rs | 4 use rustix::fs::{cwd, flock, openat, FlockOperation, Mode, OFlags}; in test_flock() 7 flock(&f, FlockOperation::LockExclusive).unwrap(); in test_flock() 8 flock(&f, FlockOperation::Unlock).unwrap(); in test_flock() 10 flock(&g, FlockOperation::LockExclusive).unwrap(); in test_flock() 11 flock(&g, FlockOperation::Unlock).unwrap(); in test_flock() 16 flock(&f, FlockOperation::LockShared).unwrap(); in test_flock() 18 flock(&g, FlockOperation::LockShared).unwrap(); in test_flock() 19 flock(&f, FlockOperation::Unlock).unwrap(); in test_flock() 20 flock(&g, FlockOperation::Unlock).unwrap(); in test_flock() 25 flock(&f, FlockOperation::LockShared).unwrap(); in test_flock() [all …]
|
/third_party/musl/libc-test/src/functionalext/supplement/linux/ |
D | flock.c | 32 result = flock(fd, LOCK_SH); in flock_0100() 50 result = flock(fd, LOCK_SH | LOCK_NB); in flock_0200() 68 result = flock(fd, LOCK_EX); in flock_0300() 86 result = flock(fd, LOCK_EX | LOCK_NB); in flock_0400() 104 result = flock(fd, LOCK_UN); in flock_0500() 117 int result = flock(-1, LOCK_EX); in flock_0600() 133 result = flock(fd, 0); in flock_0700()
|
/third_party/rust/crates/nix/test/ |
D | test_fcntl.rs | 395 let mut flock: libc::flock = unsafe { in test_ofd_write_lock() localVariable 398 flock.l_type = libc::F_WRLCK as libc::c_short; in test_ofd_write_lock() 399 flock.l_whence = libc::SEEK_SET as libc::c_short; in test_ofd_write_lock() 400 flock.l_start = 0; in test_ofd_write_lock() 401 flock.l_len = 0; in test_ofd_write_lock() 402 flock.l_pid = 0; in test_ofd_write_lock() 403 fcntl(fd, FcntlArg::F_OFD_SETLKW(&flock)).expect("write lock failed"); in test_ofd_write_lock() 409 flock.l_type = libc::F_UNLCK as libc::c_short; in test_ofd_write_lock() 410 fcntl(fd, FcntlArg::F_OFD_SETLKW(&flock)).expect("write unlock failed"); in test_ofd_write_lock() 433 let mut flock: libc::flock = unsafe { in test_ofd_read_lock() localVariable [all …]
|
/third_party/rust/crates/nix/src/ |
D | fcntl.rs | 421 F_SETLK(&'a libc::flock), 422 F_SETLKW(&'a libc::flock), 423 F_GETLK(&'a mut libc::flock), 425 F_OFD_SETLK(&'a libc::flock), 427 F_OFD_SETLKW(&'a libc::flock), 429 F_OFD_GETLK(&'a mut libc::flock), 467 F_SETLK(flock) => libc::fcntl(fd, libc::F_SETLK, flock), 469 F_SETLKW(flock) => libc::fcntl(fd, libc::F_SETLKW, flock), 471 F_GETLK(flock) => libc::fcntl(fd, libc::F_GETLK, flock), 473 F_OFD_SETLK(flock) => libc::fcntl(fd, libc::F_OFD_SETLK, flock), [all …]
|
/third_party/python/Lib/test/ |
D | test_fcntl.py | 148 fcntl.flock(fileno, fcntl.LOCK_SH) 149 fcntl.flock(fileno, fcntl.LOCK_UN) 150 fcntl.flock(self.f, fcntl.LOCK_SH | fcntl.LOCK_NB) 151 fcntl.flock(self.f, fcntl.LOCK_UN) 152 fcntl.flock(fileno, fcntl.LOCK_EX) 153 fcntl.flock(fileno, fcntl.LOCK_UN) 155 self.assertRaises(ValueError, fcntl.flock, -1, fcntl.LOCK_SH) 156 self.assertRaises(TypeError, fcntl.flock, 'spam', fcntl.LOCK_SH) 183 self.assertRaises(OverflowError, fcntl.flock, _testcapi.INT_MAX+1,
|
/third_party/ltp/testcases/kernel/syscalls/flock/ |
D | flock06.c | 27 TEST(flock(fd1, LOCK_EX | LOCK_NB)); in verify_flock() 34 TEST(flock(fd2, LOCK_EX | LOCK_NB)); in verify_flock() 40 TEST(flock(fd1, LOCK_UN)); in verify_flock() 46 TEST(flock(fd2, LOCK_EX | LOCK_NB)); in verify_flock()
|
D | flock03.c | 30 if (flock(fd2, LOCK_EX | LOCK_NB) != -1) in childfunc() 33 TEST(flock(fd, LOCK_UN)); in childfunc() 42 TEST(flock(fd2, LOCK_EX | LOCK_NB)); in childfunc() 68 TEST(flock(fd1, LOCK_EX | LOCK_NB)); in verify_flock()
|
/third_party/musl/porting/linux/user/src/linux/aarch64/ |
D | flock.s | 4 .global flock symbol 5 .type flock,%function 6 flock: label
|
/third_party/musl/src/linux/aarch64/linux/ |
D | flock.s | 4 .global flock symbol 5 .type flock,%function 6 flock: label
|
/third_party/musl/porting/linux/user/src/linux/x86_64/ |
D | flock.s | 2 .global flock symbol 3 .type flock,@function 4 flock: label
|
/third_party/musl/src/linux/x86_64/linux/ |
D | flock.s | 2 .global flock symbol 3 .type flock,@function 4 flock: label
|
/third_party/musl/porting/linux/user/src/linux/arm/ |
D | flock.s | 4 .global flock symbol 5 .type flock,%function 6 flock: label
|
/third_party/musl/src/linux/arm/linux/ |
D | flock.s | 4 .global flock symbol 5 .type flock,%function 6 flock: label
|
/third_party/ltp/testcases/kernel/fs/doio/ |
D | file_lock.c | 64 struct flock flocks; in file_lock() 66 memset(&flocks, 0, sizeof(struct flock)); in file_lock() 136 struct flock flocks; in record_lock() 138 memset(&flocks, 0, sizeof(struct flock)); in record_lock()
|
/third_party/ltp/testcases/network/nfsv4/locks/ |
D | locktests.c | 148 struct flock request; in validationResults() 263 void lockWholeFile(struct flock *request) in lockWholeFile() 383 void serializeFLock(struct flock *request) in serializeFLock() 407 void unSerializeFLock(struct flock *request) in unSerializeFLock() 417 int serverSendLockClient(struct flock *request, int client) in serverSendLockClient() 423 int serverSendLockLocal(struct flock *request, int slave) in serverSendLockLocal() 429 int getLockSection(struct flock *request) in getLockSection() 496 struct flock lock; in masterClient() 582 struct flock request; in master() 753 struct flock request; in slave()
|