NAME
getcunlocked, getcharunlocked, putcunlocked, putcharunlocked - non‐ locking stdio functions SYNOPSIS
#include
int getcunlocked(FILE *stream); int getcharunlocked(void); int putcunlocked(int c, FILE *stream); int putcharunlocked(int c); void clearerrunlocked(FILE *stream); int feofunlocked(FILE *stream); int ferrorunlocked(FILE *stream); int filenounlocked(FILE *stream); int fflushunlocked(FILE *stream); int fgetcunlocked(FILE *stream); int fputcunlocked(int c, FILE *stream); sizet freadunlocked(void *ptr, sizet size, sizet n, FILE *stream); sizet fwriteunlocked(const void *ptr, sizet size, sizet n, FILE *stream); char *fgetsunlocked(char *s, int n, FILE *stream); int fputsunlocked(const char *s, FILE *stream); #include
wintt getwcunlocked(FILE *stream); wintt getwcharunlocked(void); wintt fgetwcunlocked(FILE *stream); wintt fputwcunlocked(wchart wc, FILE *stream); wintt putwcunlocked(wchart wc, FILE *stream); wintt putwcharunlocked(wchart wc); wchart *fgetwsunlocked(wchart *ws, int n, FILE *stream); int fputwsunlocked(const wchart *ws, FILE *stream); Feature Test Macro Requirements for glibc (see featuretestmacros(7)): getcunlocked(), getcharunlocked(), putcunlocked(), putcharunlocked(): POSIXCSOURCE >= 1 || XOPENSOURCE || POSIXSOURCE || BSDSOURCE || SVIDSOURCE clearerrunlocked(), feofunlocked(), ferrorunlocked(), filenounlocked(), fflushunlocked(), fgetcunlocked(), fputcunlocked(), freadunlocked(), fwriteunlocked(): BSDSOURCE || SVIDSOURCE fgetsunlocked(), fputsunlocked(), getwcunlocked(), getwcharunlocked(), fgetwcunlocked(), fputwcunlocked(), putwcharunlocked(), fgetwsunlocked(), fputwsunlocked(): GNUSOURCE DESCRIPTION Each of these functions has the same behavior as its counterpart with‐ out the "unlocked" suffix, except that they do not use locking (they do not set locks themselves, and do not test for the presence of locks set by others) and hence are thread-unsafe. See flockfile(3). CONFORMING TO The four functions getcunlocked(), getcharunlocked(),
putcunlocked(), putcharunlocked() are in POSIX.1-2001. The nonstandard *unlocked() variants occur on a few UNIX systems, and are available in recent glibc. They should probably not be used. SEE ALSO flockfile(3), stdio(3) COLOPHON
This page is part of release 3.53 of the Linux man-pages project. A description of the project, and information about reporting bugs, can
be found at http://www.kernel.org/doc/man-pages/.
2008-08-29 UNLOCKEDSTDIO(3)