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 57686 2000-03-02 09:14:21Z sheldonh $
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.
139Before returning,
140.Fn read
141unlocks
142.Va d .
143.Pp
144In the non-threaded library
145.Fn readv
146is implemented as the
147.Va readv

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

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

--- 91 unchanged lines hidden ---