Lines Matching refs:fl

116 	struct flock fl;  in do_child()  local
121 child_get(&fl); in do_child()
122 if (fcntl(fd, F_GETLK, &fl) < 0) in do_child()
124 child_put(&fl); in do_child()
130 struct flock fl; in do_lock() local
132 fl.l_type = type; in do_lock()
133 fl.l_whence = whence; in do_lock()
134 fl.l_start = start; in do_lock()
135 fl.l_len = len; in do_lock()
136 return (fcntl(fd, cmd, &fl)); in do_lock()
139 void do_test(struct flock *fl, short type, short whence, int start, int len) in do_test() argument
141 fl->l_type = type; in do_test()
142 fl->l_whence = whence; in do_test()
143 fl->l_start = start; in do_test()
144 fl->l_len = len; in do_test()
145 fl->l_pid = (short)0; in do_test()
147 parent_put(fl); in do_test()
148 parent_get(fl); in do_test()
152 compare_lock(struct flock *fl, short type, short whence, int start, int len, in compare_lock() argument
155 if (fl->l_type != type) in compare_lock()
157 str_type(type), str_type(fl->l_type)); in compare_lock()
159 if (fl->l_whence != whence) in compare_lock()
161 whence, fl->l_whence); in compare_lock()
163 if (fl->l_start != start) in compare_lock()
165 "%d is %" PRId64, start, (int64_t) fl->l_start); in compare_lock()
167 if (fl->l_len != len) in compare_lock()
170 len, (int64_t) fl->l_len); in compare_lock()
172 if (fl->l_pid != pid) in compare_lock()
174 pid, fl->l_pid); in compare_lock()
179 struct flock fl; in unlock_file() local
183 do_test(&fl, F_WRLCK, 0, 0, 0); in unlock_file()
184 compare_lock(&fl, (short)F_UNLCK, (short)0, 0, 0, (pid_t) 0); in unlock_file()
228 struct flock fl; in stop_child() local
231 fl.l_type = STOP; in stop_child()
232 parent_put(&fl); in stop_child()