Home
last modified time | relevance | path

Searched refs:flock (Results 1 – 25 of 139) sorted by relevance

123456

/third_party/ltp/testcases/kernel/syscalls/fcntl/
Dfcntl13.c25 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 …]
Dfcntl14.c534 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 …]
Dfcntl20.c64 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 …]
Dfcntl19.c68 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 …]
Dfcntl11.c64 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 …]
Dfcntl21.c63 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 …]
Dfcntl17.c74 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()
Dfcntl16.c69 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;
Dfcntl18.c65 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/
Dflock.c32 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/
Dflock06.c27 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()
Dflock03.c30 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()
Dflock04.c33 retval = flock(fd1, opt); in child()
53 TEST(flock(fd2, tc->operation)); in verify_flock()
/third_party/boost/libs/interprocess/test/
Dfile_lock_test.cpp50 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/
Dtest_fcntl.py148 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/
Dfile_lock.c64 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/
Dos_file_functions.hpp528 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/
Dpoe-on17 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/
Dnfs_flock_func.c8 struct flock lock; in lock_reg()
20 struct flock lock; in lock_test()
/third_party/ltp/testcases/network/nfsv4/locks/
Dlocktests.c148 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/
Dfossilize_db.c190 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/
D11-1.c30 struct flock fl = { in child()
68 struct flock fl = { in main()
/third_party/ntfs-3g/libfuse-lite/
Dfuse_lowlevel.c442 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/
Dflutter96 if hash flock 2>/dev/null; then
97 flock 3 2>/dev/null || true
/third_party/python/Doc/library/
Dfcntl.rst125 .. 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`

123456