Searched refs:flock (Results 1 - 25 of 133) sorted by relevance

123456

/external/ltp/testcases/kernel/syscalls/fcntl/
H A Dfcntl13.c52 struct flock flock; local
99 flock.l_whence = -1;
100 flock.l_type = F_WRLCK;
101 flock.l_start = 0L;
102 flock.l_len = 0L;
104 if (fcntl(1, F_SETLK, &flock) != -1)
111 if (fcntl(-1, F_GETLK, &flock) != -1)
H A Dfcntl15.c74 struct flock flock; variable in typeref:struct:flock
115 flock.l_type = F_WRLCK;
116 flock.l_whence = 0;
117 flock.l_start = 5L;
118 flock.l_len = 5L;
121 if ((fcntl(fd_B, F_SETLK, &flock)) < 0) {
252 flock.l_type = F_WRLCK;
253 flock.l_whence = 0;
254 flock
[all...]
H A Dfcntl14.c533 static struct flock flock; variable in typeref:struct:flock
613 flock.l_type = thiscase->c_type;
614 flock.l_whence = thiscase->c_whence;
615 flock.l_start = thiscase->c_start;
616 flock.l_len = thiscase->c_len;
617 flock.l_pid = 0;
626 if ((rc = fcntl(fd, F_GETLK, &flock)) < 0) {
633 if (flock.l_type != F_UNLCK) {
637 flock
[all...]
H A 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;
144 struct flock fl;
153 void do_test(struct flock *fl, short type, short whence, int start, int len)
166 compare_lock(struct flock *fl, short type, short whence, int start, int len,
203 struct flock fl;
230 void parent_put(struct flock *l)
238 void parent_get(struct flock *l)
246 void child_put(struct flock *
[all...]
H A 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;
143 struct flock fl;
152 void do_test(struct flock *fl, short type, short whence, int start, int len)
165 compare_lock(struct flock *fl, short type, short whence, int start, int len,
202 struct flock fl;
229 void parent_put(struct flock *l)
237 void parent_get(struct flock *l)
245 void child_put(struct flock *
[all...]
H A 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;
130 struct flock fl;
139 void do_test(struct flock *fl, short type, short whence, int start, int len)
152 compare_lock(struct flock *fl, short type, short whence, int start, int len,
179 struct flock fl;
204 void parent_put(struct flock *l)
209 void parent_get(struct flock *l)
214 void child_put(struct flock *
[all...]
H A 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;
151 struct flock fl;
160 void do_test(struct flock *fl, short type, short whence, int start, int len)
173 compare_lock(struct flock *fl, short type, short whence, int start, int len,
210 struct flock fl;
237 void parent_put(struct flock *l)
245 void parent_get(struct flock *l)
253 void child_put(struct flock *
[all...]
H A Dfcntl18.c65 struct flock fl;
83 retval = fcntl(fd, F_GETLK, (struct flock *)INVAL_FLAG);
106 retval = fcntl(fd, F_GETLK64, (struct flock *)INVAL_FLAG);
/external/autotest/site_utils/
H A Dmerge_checksum.sh27 # This operation is performed using an flock on the packages dir
29 flock "${packages_dir}" \
/external/strace/
H A Dflock.c36 SYS_FUNC(flock)
H A Dflock.h34 typedef struct flock struct_kernel_flock;
38 # error struct flock definition not found in <linux/fcntl.h>
/external/ppp/pppd/plugins/radius/
H A Dlock.c18 struct flock fl;
37 struct flock fl;
/external/libchrome/base/
H A Dos_compat_android.h21 // The lockf() function is not available on Android; we translate to flock().
25 return flock(fd, cmd);
/external/ltp/testcases/kernel/syscalls/flock/
H A Dflock05.c23 * TEST TITLE : Testing different locks on flock(2)
34 * Tests to verify flock(2) behavior with different locking combinations along
47 * Child tries to flock() the already flocked file with different types of locks
106 TEST(flock(fd, LOCK_EX));
112 retval = flock(fd1, LOCK_SH | LOCK_NB);
115 "flock() failed to acquire shared lock on an already"
119 "flock() unexpectedly PASSED in acquiring shared lock on "
133 retval = flock(fd1, LOCK_EX | LOCK_NB);
136 "flock() failed to acquire exclusive lock on existing "
140 "flock() unexpectedl
[all...]
H A Dflock04.c23 * TEST TITLE : Testing different locks on flock(2)
34 * Tests to verify flock(2) behavior with different locking combinations along
47 * Child tries to flock() the already flocked file with different types of locks
101 TEST(flock(fd, LOCK_SH));
110 retval = flock(fd1, LOCK_SH | LOCK_NB);
113 "flock() FAILED to acquire shared lock on existing "
117 "flock() PASSED in acquiring shared lock on "
131 retval = flock(fd1, LOCK_EX | LOCK_NB);
134 "flock() failed to acquire exclusive lock on existing "
138 "flock() unexpectedl
[all...]
H A Dflock06.c26 * TEST TITLE : Error condition test for flock(2)
37 * This test verifies that flock locks held on one fd conflict with
38 * flock locks held on a different fd.
42 * It acquires an exclusive flock on the first descriptor,
43 * checks that attempting to acquire an flock on the second
99 TEST(flock(fd1, LOCK_EX | LOCK_NB));
102 "First attempt to flock() failed");
104 tst_resm(TPASS, "First attempt to flock() passed");
111 TEST(flock(fd2, LOCK_EX | LOCK_NB));
113 tst_resm(TPASS, "Second attempt to flock() denie
[all...]
H A Dflock02.c23 * TEST TITLE : Error condition test for flock(2)
35 * 1) flock(2) returns -1 and sets error number to EBADF
37 * 2) flock(2) returns -1 and sets error number to EINVAL
39 * 3) flock(2) returns -1 and sets error number to EINVAL
102 TEST(flock(-1, LOCK_SH));
105 tst_resm(TPASS, "flock failed as expected with EBADF");
107 tst_resm(TFAIL, "flock succeeded unexpectedly");
109 tst_resm(TFAIL | TTERRNO, "flock failed unexpectedly");
112 TEST(flock(fd, LOCK_NB));
115 tst_resm(TPASS, "flock faile
[all...]
H A Dflock03.c21 * This test verifies that flock cannot unlock a file locked
97 TEST(flock(fd, LOCK_EX | LOCK_NB));
101 "Parent: Initial attempt to flock() failed");
104 "Parent: Initial attempt to flock() passed");
139 if (flock(fd2, LOCK_EX | LOCK_NB) != -1) {
144 TEST(flock(fd, LOCK_UN));
156 TEST(flock(fd2, LOCK_EX | LOCK_NB));
/external/ltp/testcases/network/nfs/nfslock01/
H A Dnfs_flock_func.c8 struct flock lock;
20 struct flock lock;
/external/toybox/toys/other/
H A Dflock.c0 /* flock.c - manage advisory file locks
5 USE_FLOCK(NEWTOY(flock, "<1>1nsux[-sux]", TOYFLAG_USR|TOYFLAG_BIN))
8 bool "flock"
11 usage: flock [-sxun] fd
35 if (flock(fd, op)) {
37 else perror_exit("flock");
/external/ltp/lib/
H A Dfile_lock.c64 struct flock flocks;
66 memset(&flocks, 0, sizeof(struct flock));
136 struct flock flocks;
138 memset(&flocks, 0, sizeof(struct flock));
/external/autotest/client/bin/
H A Dautotestd40 fcntl.flock(exit_file, fcntl.LOCK_EX)
49 fcntl.flock(exit_file, fcntl.LOCK_UN)
H A Dautotestd_monitor46 fcntl.flock(exit_code_file, fcntl.LOCK_EX)
55 fcntl.flock(exit_code_file, fcntl.LOCK_UN)
/external/compiler-rt/lib/profile/
H A DWindowsMMap.h41 * flock() operations
55 int flock(int fd, int operation);
/external/kernel-headers/original/uapi/asm-mips/asm/
H A Dfcntl.h53 * The flavours of struct flock. "struct flock" is the ABI compliant
54 * variant. Finally struct flock64 is the LFS variant of struct flock. As
56 * contain all the same fields as struct flock.
63 struct flock { struct

Completed in 354 milliseconds

123456