/third_party/ltp/testcases/kernel/syscalls/fcntl/ |
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 | 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 | 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 | 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 | 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 | 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_GETLK64, (struct flock *)INVAL_FLAG); in main()
|
/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/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()
|
D | flock04.c | 33 retval = flock(fd1, opt); in child() 53 TEST(flock(fd2, tc->operation)); in verify_flock()
|
/third_party/boost/libs/interprocess/test/ |
D | file_lock_test.cpp | 50 file_lock flock(get_filename().c_str()); in main() local 52 scoped_lock<file_lock> sl(flock); in main() 55 scoped_lock<file_lock> sl(flock, try_to_lock); in main() 58 scoped_lock<file_lock> sl(flock, test::delay(1)); in main()
|
/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/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/boost/boost/interprocess/detail/ |
D | os_file_functions.hpp | 528 struct ::flock lock; 538 struct ::flock lock; 553 struct ::flock lock; 563 struct ::flock lock; 573 struct flock lock; 591 { return 0 == ::flock(hnd, LOCK_EX); } 595 int ret = ::flock(hnd, LOCK_EX | LOCK_NB); 601 { return 0 == ::flock(hnd, LOCK_UN); } 604 { return 0 == ::flock(hnd, LOCK_SH); } 608 int ret = ::flock(hnd, LOCK_SH | LOCK_NB); [all …]
|
/third_party/mesa3d/.gitlab-ci/bare-metal/ |
D | poe-on | 17 flock /var/run/poe.lock -c "snmpset -v2c -r 3 -t 30 -cmesaci $BM_POE_ADDRESS $SNMP_KEY $SNMP_OFF" 19 flock /var/run/poe.lock -c "snmpset -v2c -r 3 -t 30 -cmesaci $BM_POE_ADDRESS $SNMP_KEY $SNMP_ON"
|
/third_party/ltp/testcases/network/nfs/nfslock01/ |
D | nfs_flock_func.c | 8 struct flock lock; in lock_reg() 20 struct flock lock; in lock_test()
|
/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()
|
/third_party/mesa3d/src/util/ |
D | fossilize_db.c | 190 err = flock(fd, LOCK_EX | LOCK_NB); in lock_file_with_timeout() 251 flock(fileno(foz_db->file[file_idx]), LOCK_UN); in load_foz_dbs() 259 flock(fileno(foz_db->file[file_idx]), LOCK_UN); in load_foz_dbs() 458 flock(fileno(foz_db->file[0]), LOCK_UN); in foz_write_entry() 521 flock(fileno(foz_db->file[0]), LOCK_UN); in foz_write_entry() 529 flock(fileno(foz_db->file[0]), LOCK_UN); in foz_write_entry()
|
/third_party/ltp/testcases/open_posix_testsuite/conformance/interfaces/fork/ |
D | 11-1.c | 30 struct flock fl = { in child() 68 struct flock fl = { in main()
|
/third_party/ntfs-3g/libfuse-lite/ |
D | fuse_lowlevel.c | 442 int fuse_reply_lock(fuse_req_t req, struct flock *lock) in fuse_reply_lock() 898 struct flock *flock) in convert_fuse_file_lock() argument 900 memset(flock, 0, sizeof(struct flock)); in convert_fuse_file_lock() 901 flock->l_type = fl->type; in convert_fuse_file_lock() 902 flock->l_whence = SEEK_SET; in convert_fuse_file_lock() 903 flock->l_start = fl->start; in convert_fuse_file_lock() 905 flock->l_len = 0; in convert_fuse_file_lock() 907 flock->l_len = fl->end - fl->start + 1; in convert_fuse_file_lock() 908 flock->l_pid = fl->pid; in convert_fuse_file_lock() 915 struct flock flock; in do_getlk() local [all …]
|
/third_party/flutter/flutter/bin/ |
D | flutter | 96 if hash flock 2>/dev/null; then 97 flock 3 2>/dev/null || true
|
/third_party/python/Doc/library/ |
D | fcntl.rst | 125 .. function:: flock(fd, operation) 129 :manpage:`flock(2)` for details. (On some systems, this function is emulated 132 If the :c:func:`flock` fails, an :exc:`OSError` exception is raised. 134 .. audit-event:: fcntl.flock fd,operation fcntl.flock 184 using the :func:`flock` call may be better. 192 function provides an alternative to the :func:`lockf` and :func:`flock`
|