]> git.ipfire.org Git - thirdparty/man-pages.git/blame - man3/unlocked_stdio.3
Added FIXME
[thirdparty/man-pages.git] / man3 / unlocked_stdio.3
CommitLineData
fea681da
MK
1.\" Copyright (C) 2001 Andries Brouwer <aeb@cwi.nl>.
2.\"
3.\" Permission is granted to make and distribute verbatim copies of this
4.\" manual provided the copyright notice and this permission notice are
5.\" preserved on all copies.
6.\"
7.\" Permission is granted to copy and distribute modified versions of this
8.\" manual under the conditions for verbatim copying, provided that the
9.\" entire resulting derived work is distributed under the terms of a
10.\" permission notice identical to this one.
c13182ef 11.\"
fea681da
MK
12.\" Since the Linux kernel and libraries are constantly changing, this
13.\" manual page may be incorrect or out-of-date. The author(s) assume no
14.\" responsibility for errors or omissions, or for damages resulting from
15.\" the use of the information contained herein. The author(s) may not
16.\" have taken the same level of care in the production of this manual,
17.\" which is licensed free of charge, as they might when working
18.\" professionally.
c13182ef 19.\"
fea681da
MK
20.\" Formatted or processed versions of this manual, if unaccompanied by
21.\" the source, must acknowledge the copyright and authors of this work.
22.\"
cc4615cc 23.TH UNLOCKED_STDIO 3 2007-07-26 "" "Linux Programmer's Manual"
fea681da 24.SH NAME
69b29c78 25getc_unlocked, getchar_unlocked, putc_unlocked,
fd0930d4 26putchar_unlocked \- non-locking stdio functions
fea681da
MK
27.SH SYNOPSIS
28.nf
29.B #include <stdio.h>
30.sp
31.BI "int getc_unlocked(FILE *" stream );
0daa9e92 32.B "int getchar_unlocked(void);"
fea681da
MK
33.BI "int putc_unlocked(int " c ", FILE *" stream );
34.BI "int putchar_unlocked(int " c );
35.sp
cc4615cc 36.BR "#define _BSD_SOURCE" " /* or _SVID_SOURCE */"
fea681da
MK
37.B #include <stdio.h>
38.sp
39.BI "void clearerr_unlocked(FILE *" stream );
40.BI "int feof_unlocked(FILE *" stream );
41.BI "int ferror_unlocked(FILE *" stream );
42.BI "int fileno_unlocked(FILE *" stream );
43.BI "int fflush_unlocked(FILE *" stream );
44.BI "int fgetc_unlocked(FILE *" stream );
45.BI "int fputc_unlocked(int " c ", FILE *" stream );
46.BI "size_t fread_unlocked(void *" ptr ", size_t " size ", size_t " n ,
b9f02710 47.BI " FILE *" stream );
fea681da 48.BI "size_t fwrite_unlocked(const void *" ptr ", size_t " size ", size_t " n ,
b9f02710 49.BI " FILE *" stream );
fea681da
MK
50.sp
51.B #define _GNU_SOURCE
52.B #include <stdio.h>
53.sp
54.BI "char *fgets_unlocked(char *" s ", int " n ", FILE *" stream );
55.BI "int fputs_unlocked(const char *" s ", FILE *" stream );
56.sp
57.B #define _GNU_SOURCE
58.B #include <wchar.h>
59.sp
60.BI "wint_t getwc_unlocked(FILE *" stream );
0daa9e92 61.B "wint_t getwchar_unlocked(void);"
fea681da
MK
62.BI "wint_t fgetwc_unlocked(FILE *" stream );
63.BI "wint_t fputwc_unlocked(wchar_t " wc ", FILE *" stream );
64.BI "wint_t putwc_unlocked(wchar_t " wc ", FILE *" stream );
65.BI "wint_t putwchar_unlocked(wchar_t " wc );
66.BI "wchar_t *fgetws_unlocked(wchar_t *" ws ", int " n ", FILE *" stream );
67.BI "int fputws_unlocked(const wchar_t *" ws ", FILE *" stream );
68.fi
69.SH DESCRIPTION
d9bfdb9c 70Each of these functions has the same behavior as its counterpart
fea681da
MK
71without the `_unlocked' suffix, except that they do not use locking
72(they do not set locks themselves, and do not test for the presence
73of locks set by others) and hence are thread-unsafe.
74See
75.BR flockfile (3).
76.SH "CONFORMING TO"
d9c1ae64
MK
77The four functions
78.BR getc_unlocked (),
79.BR getchar_unlocked (),
80.BR putc_unlocked (),
81.BR putchar_unlocked ()
82are in POSIX.1-2001.
68e1685c 83
fea681da 84The nonstandard
4d52e8f8 85.BR *_unlocked ()
fea681da 86variants occur on a few Unix systems, and are available in recent glibc.
68e1685c 87.\" E.g., in HP-UX 10.0. In HP-UX 10.30 they are called obsolescent, and
fea681da 88.\" moved to a compatibility library.
68e1685c 89.\" Available in HP-UX 10.0: clearerr_unlocked, fclose_unlocked,
fea681da
MK
90.\" feof_unlocked, ferror_unlocked, fflush_unlocked, fgets_unlocked,
91.\" fgetwc_unlocked, fgetws_unlocked, fileno_unlocked, fputs_unlocked,
92.\" fputwc_unlocked, fputws_unlocked, fread_unlocked, fseek_unlocked,
93.\" ftell_unlocked, fwrite_unlocked, getc_unlocked, getchar_unlocked,
94.\" getw_unlocked, getwc_unlocked, getwchar_unlocked, putc_unlocked,
95.\" putchar_unlocked, puts_unlocked, putws_unlocked, putw_unlocked,
96.\" putwc_unlocked, putwchar_unlocked, rewind_unlocked, setvbuf_unlocked,
97.\" ungetc_unlocked, ungetwc_unlocked.
98They should probably not be used.
99.SH "SEE ALSO"
50e5322c 100.BR flockfile (3),
d142e38f 101.BR stdio (3),
a8e7c990 102.BR feature_test_macros (7)