Lines Matching refs:lf

373 	struct lockf **lf = lock->lf_head;
375 while (*lf != NOLOCKF) {
377 if ((*lf == lock) ||
378 ((*lf)->lf_id != lock->lf_id) ||
379 ((*lf)->lf_type != lock->lf_type)) {
380 lf = &(*lf)->lf_next;
388 if ((*lf)->lf_end != -1 &&
389 ((*lf)->lf_end + 1) == lock->lf_start) {
390 struct lockf *adjacent = *lf;
393 lock->lf_start = (*lf)->lf_start;
394 *lf = lock;
395 lf = &(*lf)->lf_next;
404 (lock->lf_end + 1) == (*lf)->lf_start) {
405 struct lockf *adjacent = *lf;
408 lock->lf_end = (*lf)->lf_end;
409 lock->lf_next = (*lf)->lf_next;
410 lf = &lock->lf_next;
419 lf = &(*lf)->lf_next;
829 struct lockf *lf = *head;
833 if (lf == NOLOCKF)
842 while ((ovcase = lf_findoverlap(lf, unlock, SELF, &prev, &overlap)) != OVERLAP_NONE) {
878 lf = overlap->lf_next;
885 lf = overlap->lf_next;
971 struct lockf **prev, *overlap, *lf = *(lock->lf_head);
974 lf_findoverlap(lf, lock, OTHERS, &prev, &overlap) != OVERLAP_NONE;
975 lf = overlap->lf_next) {
1001 * Parameters: lf First lock on lock list
1041 lf_findoverlap(struct lockf *lf, struct lockf *lock, int type,
1047 *overlap = lf;
1048 if (lf == NOLOCKF)
1056 while (lf != NOLOCKF) {
1057 if (((type & SELF) && lf->lf_id != lock->lf_id) ||
1058 ((type & OTHERS) && lf->lf_id == lock->lf_id)) {
1072 *prev = &lf->lf_next;
1073 *overlap = lf = lf->lf_next;
1083 lf_print("\tchecking", lf);
1088 if ((lf->lf_end != -1 && start > lf->lf_end) ||
1089 (end != -1 && lf->lf_start > end)) {
1097 if ((type & SELF) && end != -1 && lf->lf_start > end)
1099 *prev = &lf->lf_next;
1100 *overlap = lf = lf->lf_next;
1103 if ((lf->lf_start == start) && (lf->lf_end == end)) {
1107 if ((lf->lf_start <= start) &&
1109 ((lf->lf_end >= end) || (lf->lf_end == -1))) {
1113 if (start <= lf->lf_start &&
1115 (lf->lf_end != -1 && end >= lf->lf_end))) {
1119 if ((lf->lf_start < start) &&
1120 ((lf->lf_end >= start) || (lf->lf_end == -1))) {
1124 if ((lf->lf_start > start) &&
1126 ((lf->lf_end > end) || (lf->lf_end == -1))) {
1325 struct lockf *lf, *blk;
1332 for (lf = lock->lf_vnode->v_lockf; lf; lf = lf->lf_next) {
1333 printf("\tlock %p for ",(void *)lf);
1334 if (lf->lf_flags & F_POSIX)
1336 (long)((struct proc *)lf->lf_id)->p_pid);
1338 printf("id %p", (void *)lf->lf_id);
1340 lf->lf_type == F_RDLCK ? "shared" :
1341 lf->lf_type == F_WRLCK ? "exclusive" :
1342 lf->lf_type == F_UNLCK ? "unlock" :
1343 "unknown", (intmax_t)lf->lf_start, (intmax_t)lf->lf_end);
1344 TAILQ_FOREACH(blk, &lf->lf_blkhd, lf_block) {