Home
last modified time | relevance | path

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

1234567891011

/external/ltp/testcases/kernel/syscalls/fcntl/
Dfcntl15.c74 struct flock flock; variable
115 flock.l_type = F_WRLCK; in dochild1()
116 flock.l_whence = 0; in dochild1()
117 flock.l_start = 5L; in dochild1()
118 flock.l_len = 5L; in dochild1()
121 if ((fcntl(fd_B, F_SETLK, &flock)) < 0) { in dochild1()
252 flock.l_type = F_WRLCK; in dochild2()
253 flock.l_whence = 0; in dochild2()
254 flock.l_start = 0L; in dochild2()
255 flock.l_len = 5L; in dochild2()
[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 …]
Dfcntl13.c52 struct flock flock; in main() local
99 flock.l_whence = -1; in main()
100 flock.l_type = F_WRLCK; in main()
101 flock.l_start = 0L; in main()
102 flock.l_len = 0L; in main()
104 if (fcntl(1, F_SETLK, &flock) != -1) in main()
111 if (fcntl(-1, F_GETLK, &flock) != -1) in main()
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 …]
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 …]
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()
/external/rust/crates/nix/src/
Dfcntl.rs332 F_SETLK(&'a libc::flock),
333 F_SETLKW(&'a libc::flock),
334 F_GETLK(&'a mut libc::flock),
336 F_OFD_SETLK(&'a libc::flock),
338 F_OFD_SETLKW(&'a libc::flock),
340 F_OFD_GETLK(&'a mut libc::flock),
377 F_SETLK(flock) => libc::fcntl(fd, libc::F_SETLK, flock), in fcntl()
379 F_SETLKW(flock) => libc::fcntl(fd, libc::F_SETLKW, flock), in fcntl()
381 F_GETLK(flock) => libc::fcntl(fd, libc::F_GETLK, flock), in fcntl()
383 F_OFD_SETLK(flock) => libc::fcntl(fd, libc::F_OFD_SETLK, flock), in fcntl()
[all …]
/external/python/cpython2/Lib/
Dposixfile.py186 flock = struct.pack('lxxxxlxxxxlhh', \
189 flock = struct.pack('hhlllii', \
192 flock = struct.pack('hhllhh', \
195 flock = fcntl.fcntl(self._file_.fileno(), cmd, flock)
203 struct.unpack('lxxxxlxxxxlhh', flock)
206 struct.unpack('hhlllii', flock)
209 struct.unpack('hhllhh', flock)
212 struct.unpack('hhllhh', flock)
/external/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()
/external/python/cpython3/Lib/test/
Dtest_fcntl.py146 fcntl.flock(fileno, fcntl.LOCK_SH)
147 fcntl.flock(fileno, fcntl.LOCK_UN)
148 fcntl.flock(self.f, fcntl.LOCK_SH | fcntl.LOCK_NB)
149 fcntl.flock(self.f, fcntl.LOCK_UN)
150 fcntl.flock(fileno, fcntl.LOCK_EX)
151 fcntl.flock(fileno, fcntl.LOCK_UN)
153 self.assertRaises(ValueError, fcntl.flock, -1, fcntl.LOCK_SH)
154 self.assertRaises(TypeError, fcntl.flock, 'spam', fcntl.LOCK_SH)
181 self.assertRaises(OverflowError, fcntl.flock, _testcapi.INT_MAX+1,
/external/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()
/external/rust/crates/nix/test/
Dtest_fcntl.rs250 let mut flock = libc::flock { in test_ofd_write_lock() localVariable
257 fcntl(fd, FcntlArg::F_OFD_SETLKW(&flock)).expect("write lock failed"); in test_ofd_write_lock()
263 flock.l_type = libc::F_UNLCK as libc::c_short; in test_ofd_write_lock()
264 fcntl(fd, FcntlArg::F_OFD_SETLKW(&flock)).expect("write unlock failed"); in test_ofd_write_lock()
292 let mut flock = libc::flock { in test_ofd_read_lock() localVariable
299 fcntl(fd, FcntlArg::F_OFD_SETLKW(&flock)).expect("read lock failed"); in test_ofd_read_lock()
305 flock.l_type = libc::F_UNLCK as libc::c_short; in test_ofd_read_lock()
306 fcntl(fd, FcntlArg::F_OFD_SETLKW(&flock)).expect("read unlock failed"); in test_ofd_read_lock()
/external/mtools/
Dlockdev.c89 ret = flock(fd, (mode ? LOCK_EX : LOCK_SH)|LOCK_NB); in lock_dev()
93 ret = flock(fd, (mode ? LOCK_EX : LOCK_SH)); in lock_dev()
109 struct flock flk; in lock_dev()
/external/strace/
Dflock.h35 typedef struct flock struct_kernel_flock;
39 # error struct flock definition not found in <linux/fcntl.h>
/external/tensorflow/tensorflow/tools/ci_build/gpu_build/
Dparallel_gpu_execute.sh60 if flock -n "$lock_fd";
71 flock -u "$lock_fd"
/external/openssh/openbsd-compat/
Dbsd-flock.c44 flock(int fd, int op) in flock() function
49 struct flock fl = {0}; in flock()
/external/ppp/pppd/plugins/radius/
Dlock.c18 struct flock fl; in do_lock_exclusive()
37 struct flock fl; in do_unlock()
/external/ltp/testcases/network/nfs/nfslock01/
Dnfs_flock_func.c8 struct flock lock; in lock_reg()
20 struct flock lock; in lock_test()
/external/llvm-project/compiler-rt/lib/profile/
DInstrProfilingUtil.c127 struct flock s_flock; in lprofLockFd()
145 flock(fd, LOCK_EX); in lprofLockFd()
152 struct flock s_flock; in lprofUnlockFd()
170 flock(fd, LOCK_UN); in lprofUnlockFd()
/external/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()

1234567891011