• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /macosx-10.5.8/xnu-1228.15.4/bsd/kern/

Lines Matching defs:lf

324 	struct lockf **lf = lock->lf_head;
326 while (*lf != NOLOCKF) {
328 if ((*lf == lock) ||
329 ((*lf)->lf_id != lock->lf_id) ||
330 ((*lf)->lf_type != lock->lf_type)) {
331 lf = &(*lf)->lf_next;
336 if ((*lf)->lf_end != -1 &&
337 ((*lf)->lf_end + 1) == lock->lf_start) {
338 struct lockf *adjacent = *lf;
341 lock->lf_start = (*lf)->lf_start;
342 *lf = lock;
343 lf = &(*lf)->lf_next;
349 (lock->lf_end + 1) == (*lf)->lf_start) {
350 struct lockf *adjacent = *lf;
353 lock->lf_end = (*lf)->lf_end;
354 lock->lf_next = (*lf)->lf_next;
355 lf = &lock->lf_next;
361 lf = &(*lf)->lf_next;
729 struct lockf *lf = *head;
733 if (lf == NOLOCKF)
742 while ((ovcase = lf_findoverlap(lf, unlock, SELF, &prev, &overlap)) != OVERLAP_NONE) {
773 lf = overlap->lf_next;
780 lf = overlap->lf_next;
865 struct lockf **prev, *overlap, *lf = *(lock->lf_head);
869 while ((ovcase = lf_findoverlap(lf, lock, OTHERS, &prev, &overlap)) != OVERLAP_NONE) {
879 lf = overlap->lf_next;
890 * Parameters: lf First lock on lock list
930 lf_findoverlap(struct lockf *lf, struct lockf *lock, int type,
935 *overlap = lf;
936 if (lf == NOLOCKF)
944 while (lf != NOLOCKF) {
945 if (((type & SELF) && lf->lf_id != lock->lf_id) ||
946 ((type & OTHERS) && lf->lf_id == lock->lf_id)) {
947 *prev = &lf->lf_next;
948 *overlap = lf = lf->lf_next;
953 lf_print("\tchecking", lf);
958 if ((lf->lf_end != -1 && start > lf->lf_end) ||
959 (end != -1 && lf->lf_start > end)) {
962 if ((type & SELF) && end != -1 && lf->lf_start > end)
964 *prev = &lf->lf_next;
965 *overlap = lf = lf->lf_next;
968 if ((lf->lf_start == start) && (lf->lf_end == end)) {
972 if ((lf->lf_start <= start) &&
974 ((lf->lf_end >= end) || (lf->lf_end == -1))) {
978 if (start <= lf->lf_start &&
980 (lf->lf_end != -1 && end >= lf->lf_end))) {
984 if ((lf->lf_start < start) &&
985 ((lf->lf_end >= start) || (lf->lf_end == -1))) {
989 if ((lf->lf_start > start) &&
991 ((lf->lf_end > end) || (lf->lf_end == -1))) {
1185 struct lockf *lf, *blk;
1192 for (lf = lock->lf_vnode->v_lockf; lf; lf = lf->lf_next) {
1193 printf("\tlock %p for ",(void *)lf);
1194 if (lf->lf_flags & F_POSIX)
1196 (long)((struct proc *)lf->lf_id)->p_pid);
1198 printf("id %p", (void *)lf->lf_id);
1200 lf->lf_type == F_RDLCK ? "shared" :
1201 lf->lf_type == F_WRLCK ? "exclusive" :
1202 lf->lf_type == F_UNLCK ? "unlock" :
1203 "unknown", (intmax_t)lf->lf_start, (intmax_t)lf->lf_end);
1204 TAILQ_FOREACH(blk, &lf->lf_blkhd, lf_block) {