.\" $OpenBSD: pread.3,v 1.8 2000/04/15 02:15:26 aaron Exp $ .\" David Leonard , 1998. Public domain. .Dd September 7, 1998 .Dt PREAD 3 .Os .Sh NAME .Nm pread .Nd atomic seek and read .Sh SYNOPSIS .Fd #include .Ft ssize_t .Fn pread "int filedes" "void *buf" "size_t nbytes" "off_t offset" .Sh DESCRIPTION The .Fn pread function reads .Fa nbyte bytes from offset .Fa offset in the file opened on file descriptor .Fa filedes . .Pp This function is provided for use in a threaded, parallel I/O environment, where race conditions may exist between two threads non-atomically seeking and reading from the same file descriptor. .Sh RETURN VALUES The .Fn pread function returns values identical to .Xr read 2 . .Sh SEE ALSO .Xr read 2 , .Xr pthreads 3 , .Xr pwrite 3 .Sh STANDARDS .Fn pread conforms to .St -susv2 .