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/tty.4.html
tty(4) - controlling terminal (Special - Linux man page)....
The file /dev/tty is a character file with major number 5 and minor number 0, usually of mode 0666 and owner.group root.tty. It is a synonym for the controlling

manpages/ntohs.3.html
ntohs(3) - convert values between host and network byte orde
The htonl() function converts the unsigned integer hostlong from host byte order to network byte order. The htons() function converts the unsigned short integer

manpages/XForceScreenSaver.3.html
XForceScreenSaver(3) - manipulate the screen saver (ManPage)
Timeout and interval are specified in seconds. A timeout of 0 disables the screen saver (but an activated screen saver is not deactivated), and a timeout of -1

manpages/pcre16_refcount.3.html
pcre16_refcount(3) Perl-compatible regular expressions......
This function is used to maintain a reference count inside a data block that contains a compiled pattern. Its arguments are: code Compiled regular expression ad

manpages/inopts.3ncurses.html
inopts(3ncurses) - curses input options - Linux manual page
Normally, the tty driver buffers typed characters until a newline or carriage return is typed. The cbreak routine disables line buffering and erase/kill charact

manpages/textutil.n.html
textutil(n) - Procedures to manipulate texts and strings....
The package textutil provides commands that manipulate strings or texts (a.k.a. long strings or string with embedded newlines or paragraphs). It is actually a b

manpages/nftw.3.html
nftw(3) - file tree walk (Library - Linux man page).........
ftw() walks through the directory tree that is located under the directory dirpath, and calls fn() once for each entry in the tree. By default, directories are

manpages/biof.1.html
biof(1) - rotating stack of quads. - Linux manual page......
This is an attempt to recreate some of the work of William Latham. Take a look at the program organic art at this site (http://www.artworks.co.uk). Ported to Li

manpages/gnutls_pkcs7_set_crt.3.html
gnutls_pkcs7_set_crt(3) - API function - Linux manual page
This function will add a parsed certificate to the PKCS7 or RFC2630 certificate set. This is a wrapper function over gnutls_pkcs7_set_crt_raw() . RETURNS On suc

manpages/IPC::Open2.3pm.html
IPC::Open2(3pm) - open a process for both reading and writin
The open2() function runs the given $cmd and connects $chld_out for reading and $chld_in for writing. Its what you think should work when you try $pid = open(HA

manpages/XkbAddGeomKeyAlias.3.html
XkbAddGeomKeyAlias(3) - Add one key alias to an existing key
XkbAddGeomKeyAlias.3 - Xkb provides functions to add a single new element to the top-level keyboard geometry. In each case the num_ * fields of the correspondin

manpages/imake.1.html
imake(1) - C preprocessor interface to the make utility.....
Imake is used to generate Makefiles from a template, a set of cpp macro functions, and a per-directory input file called an Imakefile. This allows machine depen





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