UNLOCKED_STDIO


HOME

UNLOCKED_STDIO

NAME
SYNOPSIS
DESCRIPTION
CONFORMING TO
SEE ALSO
COLOPHON

NAME

getc_unlocked, getchar_unlocked, putc_unlocked, putchar_unlocked − nonlocking stdio functions

SYNOPSIS

#include <stdio.h>

int getc_unlocked(FILE *stream);
int getchar_unlocked(void);
int putc_unlocked(int
c, FILE *stream);
int putchar_unlocked(int
c);

void clearerr_unlocked(FILE *stream);
int feof_unlocked(FILE *
stream);
int ferror_unlocked(FILE *
stream);
int fileno_unlocked(FILE *
stream);
int fflush_unlocked(FILE *
stream);
int fgetc_unlocked(FILE *
stream);
int fputc_unlocked(int
c, FILE *stream);
size_t fread_unlocked(void *
ptr, size_t size, size_t n,
FILE *
stream);
size_t fwrite_unlocked(const void *
ptr, size_t size, size_t n,
FILE *
stream);

char *fgets_unlocked(char *s, int n, FILE *stream);
int fputs_unlocked(const char *
s, FILE *stream);

#include <wchar.h>

wint_t getwc_unlocked(FILE *stream);
wint_t getwchar_unlocked(void);
wint_t fgetwc_unlocked(FILE *
stream);
wint_t fputwc_unlocked(wchar_t
wc, FILE *stream);
wint_t putwc_unlocked(wchar_t
wc, FILE *stream);
wint_t putwchar_unlocked(wchar_t
wc);
wchar_t *fgetws_unlocked(wchar_t *
ws, int n, FILE *stream);
int fputws_unlocked(const wchar_t *
ws, FILE *stream);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

getc_unlocked(), getchar_unlocked(), putc_unlocked(), putchar_unlocked():

_POSIX_C_SOURCE >= 1 || _XOPEN_SOURCE || _POSIX_SOURCE || _BSD_SOURCE || _SVID_SOURCE

clearerr_unlocked(), feof_unlocked(), ferror_unlocked(), fileno_unlocked(), fflush_unlocked(), fgetc_unlocked(), fputc_unlocked(), fread_unlocked(), fwrite_unlocked():

_BSD_SOURCE || _SVID_SOURCE

fgets_unlocked(), fputs_unlocked(), getwc_unlocked(), getwchar_unlocked(), fgetwc_unlocked(), fputwc_unlocked(), putwchar_unlocked(), fgetws_unlocked(), fputws_unlocked():

_GNU_SOURCE

DESCRIPTION

Each of these functions has the same behavior as its counterpart without 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 getc_unlocked(), getchar_unlocked(), putc_unlocked(), putchar_unlocked() 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.69 of the Linux man-pages project. A description of the project, information about reporting bugs, and the latest version of this page, can be found at http://www.kernel.org/doc/man−pages/.




More Linux Commands

manpages/XGrabPointer.3.html
XGrabPointer(3) - grab the pointer - Linux manual page......
The XGrabPointer function actively grabs control of the pointer and returns GrabSuccess if the grab was successful. Further pointer events are reported only to

manpages/gnutls_openpgp_keyring_deinit.3.html
gnutls_openpgp_keyring_deinit(3) - API function (Man Page)
This function will deinitialize a keyring structure. REPORTING BUGS Report bugs to &lt;bug-gnutls@gnu.org&gt;. GnuTLS home page: http://www.gnu.org/software/gnutls/ G

manpages/perlfunc.1.html
perlfunc(1) - Perl builtin functions - Linux manual page....
The functions in this section can serve as terms in an expression. They fall into two major categories: list operators and named unary operators. These differ i

manpages/Tcl_UniCharIsControl.3.html
Tcl_UniCharIsControl(3) - routines for classification of Tcl
All of the routines described examine Tcl_UniChars and return a boolean value. A non-zero return value means that the character does belong to the character cla

manpages/atan2.3.html
atan2(3) - arc tangent function of two variables (Man Page)
The atan2() function calculates the principal value of the arc tangent of y/x, using the signs of the two arguments to determine the quadrant of the result. RET

manpages/mvin_wch.3ncurses.html
mvin_wch(3ncurses) - extract a complex character and renditi
These functions extract the complex character and rendition from the current position in the named window into the cchar_t object referenced by wcval. RETURN VA

manpages/lavpipe.1.html
lavpipe(1) - creates raw YUV streams from pipe list scripts
lavpipe reads a script file called pipe list that is of a similar structure as the edit lists that can be fed into lav2yuv. For info about the pipe list format

manpages/Tcl_SetDoubleObj.3.html
Tcl_SetDoubleObj(3) - manipulate Tcl objects as floating-poi
These procedures are used to create, modify, and read Tcl objects that hold double-precision floating-point values. Tcl_NewDoubleObj creates and returns a new T

manpages/SDL_SetCursor.3.html
SDL_SetCursor(3) - Set the currently active mouse cursor....
Sets the currently active cursor to the specified one. If the cursor is currently visible, the change will be immediately represented on the display. SEE ALSO S

manpages/joe.1.html
joe(1) - Joe's Own Editor (Commands - Linux manual page)....
JOE is a powerful ASCII-text screen editor. It has a mode-less user interface which is similar to many user-friendly PC editors. Users of Micro-Pros WordStar or

manpages/fblocked.n.html
fblocked(n) - Test whether the last input operation exhauste
The fblocked command returns 1 if the most recent input operation on channelId returned less information than requested because all available input was exhauste

manpages/xml_pp.1.html
xml_pp(1) xml prettyprinter (Commands - Linux man page).....
XML pretty printer using XML::Twig OPTIONS -i[&lt;extension&gt;] edits the file(s) in place, if an extension is provided (no space between -i and the extension) then





We can't live, work or learn in freedom unless the software we use is free.