Lines Matching refs:fl
134 struct flock fl;
139 child_get(&fl);
140 if (fcntl(fd, F_GETLK, &fl) < 0) {
145 child_put(&fl);
151 struct flock fl;
153 fl.l_type = type;
154 fl.l_whence = whence;
155 fl.l_start = start;
156 fl.l_len = len;
157 return (fcntl(fd, cmd, &fl));
160 void do_test(struct flock *fl, short type, short whence, int start, int len)
162 fl->l_type = type;
163 fl->l_whence = whence;
164 fl->l_start = start;
165 fl->l_len = len;
166 fl->l_pid = (short)0;
168 parent_put(fl);
169 parent_get(fl);
173 compare_lock(struct flock *fl, short type, short whence, int start, int len,
176 if (fl->l_type != type) {
178 str_type(type), str_type(fl->l_type));
182 if (fl->l_whence != whence) {
184 whence, fl->l_whence);
188 if (fl->l_start != start) {
190 "%d is %" PRId64, start, (int64_t) fl->l_start);
194 if (fl->l_len != len) {
197 len, (int64_t) fl->l_len);
201 if (fl->l_pid != pid) {
203 pid, fl->l_pid);
210 struct flock fl;
216 do_test(&fl, F_WRLCK, 0, 0, 0);
217 compare_lock(&fl, (short)F_UNLCK, (short)0, 0, 0, (pid_t) 0);
273 struct flock fl;
276 fl.l_type = STOP;
277 parent_put(&fl);