Lines Matching refs:lockf

77 #include <sys/lockf.h>
91 void lf_print(const char *tag, struct lockf *lock);
92 void lf_printlist(const char *tag, struct lockf *lock);
110 MALLOC_DEFINE(M_LOCKF, "lockf", "Byte-range locking structures");
112 #define NOLOCKF (struct lockf *)0
129 static int lf_clearlock(struct lockf *);
130 static overlap_t lf_findoverlap(struct lockf *,
131 struct lockf *, int, struct lockf ***, struct lockf **);
132 static struct lockf *lf_getblock(struct lockf *, pid_t);
133 static int lf_getlock(struct lockf *, struct flock *, pid_t);
134 static int lf_setlock(struct lockf *, struct timespec *);
135 static int lf_split(struct lockf *, struct lockf *);
136 static void lf_wakelock(struct lockf *, boolean_t);
138 static void lf_hold_assertion(task_t, struct lockf *);
139 static void lf_jump_to_queue_head(struct lockf *, struct lockf *);
140 static void lf_drop_assertion(struct lockf *);
174 struct lockf *lock;
178 struct lockf **head = &vp->v_lockf;
185 if (*head == (struct lockf *)0) {
257 * Create the lockf structure
259 MALLOC(lock, struct lockf *, sizeof *lock, M_LOCKF, M_WAITOK);
268 lock->lf_next = (struct lockf *)0;
278 lck_mtx_lock(&vp->v_lock); /* protect the lockf list */
318 struct lockf *lock;
326 struct lockf *tlock;
346 lf_move_blocked(struct lockf *to, struct lockf *from)
348 struct lockf *tlock;
371 lf_coalesce_adjacent(struct lockf *lock)
373 struct lockf **lf = lock->lf_head;
390 struct lockf *adjacent = *lf;
405 struct lockf *adjacent = *lf;
451 lf_setlock(struct lockf *lock, struct timespec *timeout)
453 struct lockf *block;
454 struct lockf **head = lock->lf_head;
455 struct lockf **prev, *overlap, *ltmp;
456 static char lockstr[] = "lockf";
505 struct lockf *waitblock;
520 while (((waitblock = (struct lockf *)ut->uu_wchan) != NULL) &&
523 waitblock = (struct lockf *)ut->uu_wchan;
826 lf_clearlock(struct lockf *unlock)
828 struct lockf **head = unlock->lf_head;
829 struct lockf *lf = *head;
830 struct lockf *overlap, **prev;
925 lf_getlock(struct lockf *lock, struct flock *fl, pid_t matchpid)
927 struct lockf *block;
966 * struct lockf.
968 static struct lockf *
969 lf_getblock(struct lockf *lock, pid_t matchpid)
971 struct lockf **prev, *overlap, *lf = *(lock->lf_head);
1041 lf_findoverlap(struct lockf *lf, struct lockf *lock, int type,
1042 struct lockf ***prev, struct lockf **overlap)
1160 lf_split(struct lockf *lock1, struct lockf *lock2)
1162 struct lockf *splitlock;
1188 MALLOC(splitlock, struct lockf *, sizeof *splitlock, M_LOCKF, M_WAITOK);
1225 lf_wakelock(struct lockf *listhead, boolean_t force_all)
1227 struct lockf *wakelock;
1251 struct lockf *tlock;
1283 lf_print(const char *tag, struct lockf *lock)
1323 lf_printlist(const char *tag, struct lockf *lock)
1325 struct lockf *lf, *blk;
1386 lf_hold_assertion(task_t block_task, struct lockf *block)
1400 * Parameters: block lockf struct containing the
1402 * lock lockf struct to be jumped to the
1408 lf_jump_to_queue_head(struct lockf *block, struct lockf *lock)
1421 * Parameters: block lockf struct holding the assertion.
1426 lf_drop_assertion(struct lockf *block)