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