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