Lines Matching refs:fl
127 struct flock fl; in do_child() local
132 child_get(&fl); in do_child()
133 if (fcntl(fd, F_GETLK, &fl) < 0) { in do_child()
137 child_put(&fl); in do_child()
143 struct flock fl; in do_lock() local
145 fl.l_type = type; in do_lock()
146 fl.l_whence = whence; in do_lock()
147 fl.l_start = start; in do_lock()
148 fl.l_len = len; in do_lock()
149 return (fcntl(fd, cmd, &fl)); in do_lock()
152 void do_test(struct flock *fl, short type, short whence, int start, int len) in do_test() argument
154 fl->l_type = type; in do_test()
155 fl->l_whence = whence; in do_test()
156 fl->l_start = start; in do_test()
157 fl->l_len = len; in do_test()
158 fl->l_pid = (short)0; in do_test()
160 parent_put(fl); in do_test()
161 parent_get(fl); in do_test()
165 compare_lock(struct flock *fl, short type, short whence, int start, int len, in compare_lock() argument
168 if (fl->l_type != type) { in compare_lock()
170 str_type(type), str_type(fl->l_type)); in compare_lock()
174 if (fl->l_whence != whence) { in compare_lock()
176 whence, fl->l_whence); in compare_lock()
180 if (fl->l_start != start) { in compare_lock()
182 "%d is %" PRId64, start, (int64_t) fl->l_start); in compare_lock()
186 if (fl->l_len != len) { in compare_lock()
189 len, (int64_t) fl->l_len); in compare_lock()
193 if (fl->l_pid != pid) { in compare_lock()
195 pid, fl->l_pid); in compare_lock()
202 struct flock fl; in unlock_file() local
208 do_test(&fl, F_WRLCK, 0, 0, 0); in unlock_file()
209 compare_lock(&fl, (short)F_UNLCK, (short)0, 0, 0, (pid_t) 0); in unlock_file()
265 struct flock fl; in stop_child() local
268 fl.l_type = STOP; in stop_child()
269 parent_put(&fl); in stop_child()