Deleted Added
sdiff udiff text old ( 50476 ) new ( 57686 )
full compact
1.\" Copyright (c) 1980, 1991, 1993
2.\" The Regents of the University of California. All rights reserved.
3.\"
4.\" Redistribution and use in source and binary forms, with or without
5.\" modification, are permitted provided that the following conditions
6.\" are met:
7.\" 1. Redistributions of source code must retain the above copyright
8.\" notice, this list of conditions and the following disclaimer.

--- 16 unchanged lines hidden (view full) ---

25.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
26.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
27.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
28.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
29.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
30.\" SUCH DAMAGE.
31.\"
32.\" @(#)read.2 8.4 (Berkeley) 2/26/94
33.\" $FreeBSD: head/lib/libc/sys/read.2 50476 1999-08-28 00:22:10Z peter $
34.\"
35.Dd February 26, 1994
36.Dt READ 2
37.Os BSD 4
38.Sh NAME
39.Nm read ,
40.Nm readv ,
41.Nm pread

--- 88 unchanged lines hidden (view full) ---

130and
131.Fn read
132is implemented as a function which locks
133.Va d
134for read, then calls
135.Fn _thread_sys_read .
136If the call to
137.Fn _thread_sys_read
138would block, a context switch is performed. Before returning,
139.Fn read
140unlocks
141.Va d .
142.Pp
143In the non-threaded library
144.Fn readv
145is implemented as the
146.Va readv

--- 6 unchanged lines hidden (view full) ---

153and
154.Fn readv
155is implemented as a function which locks
156.Va d
157for read, then calls
158.Fn _thread_sys_readv .
159If the call to
160.Fn _thread_sys_readv
161would block, a context switch is performed. Before returning,
162.Fn readv
163unlocks
164.Va d .
165.Sh RETURN VALUES
166If successful, the
167number of bytes actually read is returned. Upon reading end-of-file,
168zero is returned.
169Otherwise, a -1 is returned and the global variable
170.Va errno
171is set to indicate the error.
172.Sh ERRORS
173.Fn Read ,
174.Fn readv ,
175and

--- 91 unchanged lines hidden ---