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