Lines Matching refs:fh
119 iwrc iwp_fstath(HANDLE fh, IWP_FILE_STAT *fs) { in iwp_fstath() argument
120 return _iwp_fstat(0, fh, fs); in iwp_fstath()
123 iwrc iwp_flock(HANDLE fh, iwp_lockmode lmode) { in iwp_flock() argument
124 if (INVALIDHANDLE(fh)) { in iwp_flock()
131 while (fcntl(fh, (lmode & IWP_NBLOCK) ? F_SETLK : F_SETLKW, &lock) == -1) { in iwp_flock()
139 iwrc iwp_unlock(HANDLE fh) { in iwp_unlock() argument
140 if (INVALIDHANDLE(fh)) { in iwp_unlock()
144 while (fcntl(fh, F_SETLKW, &lock) == -1) { in iwp_unlock()
152 iwrc iwp_closefh(HANDLE fh) { in iwp_closefh() argument
153 if (INVALIDHANDLE(fh)) { in iwp_closefh()
156 if (close(fh) == -1) { in iwp_closefh()
162 iwrc iwp_pread(HANDLE fh, off_t off, void *buf, size_t siz, size_t *sp) { in iwp_pread() argument
163 if (INVALIDHANDLE(fh)) { in iwp_pread()
171 rs = pread(fh, buf, siz, off); in iwp_pread()
184 iwrc iwp_read(HANDLE fh, void *buf, size_t count, size_t *sp) { in iwp_read() argument
185 if (INVALIDHANDLE(fh)) { in iwp_read()
193 rs = read(fh, buf, count); in iwp_read()
206 iwrc iwp_pwrite(HANDLE fh, off_t off, const void *buf, size_t siz, size_t *sp) { in iwp_pwrite() argument
207 if (INVALIDHANDLE(fh)) { in iwp_pwrite()
215 ws = pwrite(fh, buf, siz, off); in iwp_pwrite()
228 iwrc iwp_write(HANDLE fh, const void *buf, size_t size) { in iwp_write() argument
229 if (INVALIDHANDLE(fh)) { in iwp_write()
234 ssize_t wb = write(fh, rp, size); in iwp_write()
252 iwrc iwp_lseek(HANDLE fh, off_t offset, iwp_seek_origin origin, off_t *pos) { in iwp_lseek() argument
256 if (INVALIDHANDLE(fh)) { in iwp_lseek()
265 off_t off = lseek(fh, offset, whence); in iwp_lseek()
288 iwrc iwp_ftruncate(HANDLE fh, off_t len) { in iwp_ftruncate() argument
289 int rci = ftruncate(fh, len); in iwp_ftruncate()
293 iwrc iwp_fallocate(HANDLE fh, off_t len) { in iwp_fallocate() argument
295 int rci = posix_fallocate(fh, 0, len); in iwp_fallocate()
303 fcntl(fh, F_PREALLOCATE, &fstore); in iwp_fallocate()
304 int rci = ftruncate(fh, len); in iwp_fallocate()
360 iwrc iwp_fsync(HANDLE fh) { in iwp_fsync() argument
361 int rci = fsync(fh); in iwp_fsync()
365 iwrc iwp_fdatasync(HANDLE fh) { in iwp_fdatasync() argument
367 if (fcntl(fh, F_FULLFSYNC) == -1) { in iwp_fdatasync()
371 if (fdatasync(fh) == -1) { in iwp_fdatasync()