lockf
if (lockf(fileno(score_fp), F_LOCK, 1) < 0)
int lockf(int, int, off_t);
__weak_alias(lockf,_lockf)
lockf(int filedes, int function, off_t size)
if (lockf(fileno(fp), F_LOCK, (off_t)0) == -1)
if (lockf(fileno(fp), F_ULOCK, (off_t)0) == -1)
struct lockf *i_lockf; /* head of byte-level lock list */
struct lockf *ei_lockf; /* advisory lock */
struct lockf *i_lockf; /* head of byte-level lock list */
struct lockf *de_lockf; /* byte level lock list */
struct lockf *n_lockf; /* Locking record of file */
struct lockf *lockf; /* lock list */
node->lockf = NULL;
return lf_advlock(ap, &nilfs_node->lockf, file_size);
struct lockf * pn_lockf;
struct lockf *lockf; /* advlock */
bnode->lockf = NULL; /* advlock */
return lf_advlock(ap, &bnode->lockf, bfs_file_size(bnode->inode));
struct lockf * tn_lockf;
struct lockf *lockf; /* lock list */
udf_node->lockf = 0;
udf_node->lockf = 0;
return lf_advlock(ap, &udf_node->lockf, file_size);
struct lockf *lockf; /* advlock */
v7fs_node->lockf = NULL; /* advlock */
return lf_advlock(a, &v7node->lockf,
lf_print(const char *tag, struct lockf *lock)
lf_printlist(const char *tag, struct lockf *lock)
struct lockf *lf, *blk;
static struct lockf *
struct lockf *lock;
lf_free(struct lockf *lock)
lf_findoverlap(struct lockf *lf, struct lockf *lock, int type,
struct lockf ***prev, struct lockf **overlap)
lf_split(struct lockf *lock1, struct lockf *lock2, struct lockf **sparelock)
struct lockf *splitlock;
lf_wakelock(struct lockf *listhead)
struct lockf *wakelock;
lf_clearlock(struct lockf *unlock, struct lockf **sparelock)
struct lockf **head = unlock->lf_head;
struct lockf *lf = *head;
struct lockf *overlap, **prev;
static struct lockf *
lf_getblock(struct lockf *lock)
struct lockf **prev, *overlap, *lf = *(lock->lf_head);
lf_setlock(struct lockf *lock, struct lockf **sparelock,
struct lockf *block;
struct lockf **head = lock->lf_head;
struct lockf **prev, *overlap, *ltmp;
volatile const struct lockf *waitblock;
TAILQ_HEAD(locklist, lockf);
lf_getlock(struct lockf *lock, struct flock *fl)
struct lockf *block;
struct lockf **lf_head; /* Back pointer to the head of lockf list */
struct lockf *lf_next; /* Next lock on this vnode, or blocking lock */
lf_advlock(struct vop_advlock_args *ap, struct lockf **head, off_t size)
struct lockf *lock = NULL;
struct lockf *sparelock;
TAILQ_ENTRY(lockf) lf_block;/* A request waiting for a lock */
if (*head == (struct lockf *)0) {
lock->lf_next = (struct lockf *)0;
struct lockf *sd_lockf;
struct lockf *n_lockf; /* Locking record of file */
struct lockf *rn_lockf;
struct lockf;
int lf_advlock(struct vop_advlock_args *, struct lockf **, off_t);
struct lockf *i_lockf;/* Head of byte-level lock list. */
struct lockf *i_lockf;/* Head of byte-level lock list. */
ret = lockf(fd, op, lk_size);
RL(lockf(fd, F_LOCK, 0));
struct lockf *z_lockf; /* head of byte-level lock list */