Lines Matching defs:lock
45 static int state_lock_(const char *lock_file, int lock, int timeout, int _fd)
57 lck.l_type = lock ? F_WRLCK : F_UNLCK;
62 if (lock) {
70 if (!lock && fd < 0) {
99 if (st.st_size != 11 || !lock) {
104 if (lock && lseek(fd, 0, SEEK_SET)) {
137 if (lock) {
168 error("file %s lock error: %s", file, strerror(-err));
186 snprintf(buf, buflen, "%s/card%i.lock", lockpath, card_number);
197 error("card %d lock error: %s", card_number, strerror(-err));