file_lock
struct file_lock *p;
struct file_lock *
struct file_lock *p;
if (p == NULL && (p = (struct file_lock *)
malloc(sizeof(struct file_lock))) != NULL) {
struct file_lock *p;
struct file_lock *p;
struct file_lock *p;
LIST_ENTRY(file_lock) entry; /* Entry if file list. */
LIST_HEAD(file_list_head, file_lock) head;
struct file_lock fl;
struct file_lock *
switch (file_lock(sp, oname,
if (!noname && file_lock(sp, NULL, NULL, fd, 0) == LOCK_UNAVAIL)
if (file_lock(sp, NULL, NULL, fd, 1) != LOCK_SUCCESS)
switch ((*locked = file_lock(sp, NULL, NULL, fd, 0))) {
if (file_lock(sp, NULL, NULL, fileno(fp), 0) == LOCK_UNAVAIL)
lockr_t file_lock(SCR *, char *, int *, int, int);
static struct file_lock *lalloc(void);
void lfree(struct file_lock *);
enum nlm_stats do_lock(struct file_lock *, int);
enum nlm_stats do_unlock(struct file_lock *);
void send_granted(struct file_lock *, int);
static struct file_lock *lock_lookup(struct file_lock *, int);
static struct file_lock *
lock_lookup(struct file_lock *newfl, int flags)
struct file_lock *fl;
struct file_lock *fl;
struct file_lock *fl, *newfl;
struct file_lock *fl;
static struct file_lock *
return calloc(1, sizeof(struct file_lock));
lfree(struct file_lock *fl)
struct file_lock *fl;
LIST_HEAD(lcklst_head, file_lock);
do_lock(struct file_lock *fl, int block)
send_granted(struct file_lock *fl, int opcode)
do_unlock(struct file_lock *rfl)
struct file_lock *fl;
struct file_lock *fl, *next_fl;
LIST_ENTRY(file_lock) lcklst;