Lines Matching refs:fl
130 struct flock fl;
135 child_get(&fl);
136 if (fcntl(fd, F_GETLK, &fl) < 0)
138 child_put(&fl);
144 struct flock fl;
146 fl.l_type = type;
147 fl.l_whence = whence;
148 fl.l_start = start;
149 fl.l_len = len;
150 return (fcntl(fd, cmd, &fl));
153 void do_test(struct flock *fl, short type, short whence, int start, int len)
155 fl->l_type = type;
156 fl->l_whence = whence;
157 fl->l_start = start;
158 fl->l_len = len;
159 fl->l_pid = (short)0;
161 parent_put(fl);
162 parent_get(fl);
166 compare_lock(struct flock *fl, short type, short whence, int start, int len,
169 if (fl->l_type != type) {
171 str_type(type), str_type(fl->l_type));
175 if (fl->l_whence != whence) {
177 whence, fl->l_whence);
181 if (fl->l_start != start) {
183 "%d is %" PRId64, start, (int64_t) fl->l_start);
187 if (fl->l_len != len) {
190 len, (int64_t) fl->l_len);
194 if (fl->l_pid != pid) {
196 pid, fl->l_pid);
203 struct flock fl;
209 do_test(&fl, F_WRLCK, 0, 0, 0);
210 compare_lock(&fl, (short)F_UNLCK, (short)0, 0, 0, (pid_t) 0);
266 struct flock fl;
269 fl.l_type = STOP;
270 parent_put(&fl);