xref: /openbsd-src/lib/libpthread/man/getc_unlocked.3 (revision a28daedfc357b214be5c701aa8ba8adb29a7f1c2)
1.\" $OpenBSD: getc_unlocked.3,v 1.4 2007/05/31 19:19:36 jmc Exp $
2.\" David Leonard <d@openbsd.org>, 1999. Public domain.
3.Dd $Mdocdate: May 31 2007 $
4.Dt GETC_UNLOCKED 3
5.Os
6.Sh NAME
7.Nm getc_unlocked ,
8.Nm getchar_unlocked
9.Nd get next character from stream, efficiently
10.Sh SYNOPSIS
11.Fd #include <stdio.h>
12.Ft int
13.Fn getc_unlocked "FILE *stream"
14.Ft int
15.Fn getchar_unlocked
16.Sh DESCRIPTION
17The
18.Fn getc_unlocked
19and
20.Fn getchar_unlocked
21functions are equivalent to their locked counterparts,
22.Xr getc 3
23and
24.Xr getchar 3 .
25However,
26.Fn getc_unlocked
27and
28.Fn getchar_unlocked
29assume that the relevant stream has either been previously locked
30with
31.Xr flockfile 3 ,
32or that it will not be accessed by any other thread.
33.Sh RETURN VALUES
34The return values are as described for
35.Xr getc 3
36and
37.Xr getchar 3 .
38.Sh SEE ALSO
39.Xr getc 3 ,
40.Xr getchar 3
41.Sh STANDARDS
42.Fn getc_unlocked
43and
44.Fn getchar_unlocked
45conform to ISO/IEC 9945-1 ANSI/IEEE
46.Pq Dq Tn POSIX
47Std 1003.1 Second Edition 1996-07-12.
48