Lines Matching refs:fd
29 do_lock(int fd, int type, off_t start, off_t length)
38 if (fcntl(fd, F_SETLK, &flock) != 0) {
49 shared_lock(int fd, off_t start, off_t length)
51 return do_lock(fd, F_RDLCK, start, length);
56 exclusive_lock(int fd, off_t start, off_t length)
58 return do_lock(fd, F_WRLCK, start, length);
63 remove_lock(int fd, off_t start, off_t length)
65 return do_lock(fd, F_UNLCK, start, length);
102 int fd = open(kTemporaryFile, O_CREAT | O_RDWR, 0644);
103 if (fd < 0) {
131 do_lock(fd, type, start, length);
136 close(fd);