Lines Matching defs:lf

157 	struct lockf *lf, *blk;
160 for (lf = *lock->lf_head; lf; lf = lf->lf_next) {
161 printf("\tlock %p for ", lf);
162 if (lf->lf_flags & F_POSIX)
163 printf("proc %d", ((struct proc *)lf->lf_id)->p_pid);
165 printf("file %p", (struct file *)lf->lf_id);
167 lf->lf_type == F_RDLCK ? "shared" :
168 lf->lf_type == F_WRLCK ? "exclusive" :
169 lf->lf_type == F_UNLCK ? "unlock" :
170 "unknown", (intmax_t)lf->lf_start, (intmax_t)lf->lf_end);
171 TAILQ_FOREACH(blk, &lf->lf_blkhd, lf_block) {
234 lf_findoverlap(struct lockf *lf, struct lockf *lock, int type,
239 *overlap = lf;
240 if (lf == NULL)
248 while (lf != NULL) {
249 if (((type == SELF) && lf->lf_id != lock->lf_id) ||
250 ((type == OTHERS) && lf->lf_id == lock->lf_id)) {
251 *prev = &lf->lf_next;
252 *overlap = lf = lf->lf_next;
257 lf_print("\tchecking", lf);
270 if ((lf->lf_end != -1 && start > lf->lf_end) ||
271 (end != -1 && lf->lf_start > end)) {
277 if ((type & SELF) && end != -1 && lf->lf_start > end)
279 *prev = &lf->lf_next;
280 *overlap = lf = lf->lf_next;
283 if ((lf->lf_start == start) && (lf->lf_end == end)) {
291 if ((lf->lf_start <= start) &&
293 ((lf->lf_end >= end) || (lf->lf_end == -1))) {
301 if (start <= lf->lf_start &&
303 (lf->lf_end != -1 && end >= lf->lf_end))) {
311 if ((lf->lf_start < start) &&
312 ((lf->lf_end >= start) || (lf->lf_end == -1))) {
320 if ((lf->lf_start > start) &&
322 ((lf->lf_end > end) || (lf->lf_end == -1))) {
415 struct lockf *lf = *head;
419 if (lf == NULL)
428 while ((ovcase = lf_findoverlap(lf, unlock, SELF,
453 lf = overlap->lf_next;
460 lf = overlap->lf_next;
483 struct lockf **prev, *overlap, *lf = *(lock->lf_head);
486 while (lf_findoverlap(lf, lock, OTHERS, &prev, &overlap) != 0) {
496 lf = overlap->lf_next;