Deleted Added
full compact
read.2 (50476) read.2 (57686)
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
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 $
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
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,
138would block, a context switch is performed.
139Before 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
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
161would block, a context switch is performed. Before returning,
162would block, a context switch is performed.
163Before returning,
162.Fn readv
163unlocks
164.Va d .
165.Sh RETURN VALUES
166If successful, the
164.Fn readv
165unlocks
166.Va d .
167.Sh RETURN VALUES
168If successful, the
167number of bytes actually read is returned. Upon reading end-of-file,
169number of bytes actually read is returned.
170Upon 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 ---
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 ---