Lines Matching refs:operation
18 int make_lock_file(const char *p, int operation, LockFile *ret) { in make_lock_file() argument
40 .l_type = (operation & ~LOCK_NB) == LOCK_EX ? F_WRLCK : F_RDLCK, in make_lock_file()
49 r = fcntl(fd, (operation & LOCK_NB) ? F_OFD_SETLK : F_OFD_SETLKW, &fl); in make_lock_file()
54 r = flock(fd, operation); in make_lock_file()
77 ret->operation = operation; in make_lock_file()
85 int make_lock_file_for(const char *p, int operation, LockFile *ret) { in make_lock_file_for() argument
99 return make_lock_file(t, operation, ret); in make_lock_file_for()
115 (f->operation & ~LOCK_NB) == LOCK_SH) { in release_lock_file()
126 f->operation = LOCK_EX|LOCK_NB; in release_lock_file()
129 if ((f->operation & ~LOCK_NB) == LOCK_EX) in release_lock_file()
136 f->operation = 0; in release_lock_file()