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/keyctl_reject.3.html
keyctl_reject(3) - Negatively instantiate a key specifying s
keyctl_assume_authority() assumes the authority for the calling thread to deal with and instantiate the specified uninstantiated key. The calling thread must ha

manpages/sasl_dispose.3.html
sasl_dispose(3) - Dispose of a SASL connection object.......
sasl_dispose is called when a SASL connection object is no longer needed. Note that this is usually when the protocol session is done NOT when the authenticatio

manpages/glutInit.3.html
glutInit(3) - initialize the GLUT library. - Linux man page
glutInit will initialize the GLUT library and negotiate a session with the window system. During this process, glutInit may cause the termination of the GLUT pr

manpages/versionsort.3.html
versionsort(3) - scan a directory for matching entries......
The scandir() function scans the directory dirp, calling filter() on each directory entry. Entries for which filter() returns nonzero are stored in strings allo

manpages/gvmap.sh.1.html
gvmap.sh(1) - pipeline for running gvmap - Linux man page...
gvmap.sh takes as input a graph in DOT format, performs a layout, runs the output through gvmap and renders the output. At some point, it is hoped to integrate

manpages/zshmisc.1.html
zshmisc(1) - everything and then some - Linux manual page...
A simple command is a sequence of optional parameter assignments followed by blankseparated words, with optional redirections interspersed. For a descriptio....

manpages/keyok_sp.3ncurses.html
keyok_sp(3ncurses) - curses screen-pointer extension........
This implementation can be configured to provide a set of functions which improve the ability to manage multiple screens. This feature can be added to any of th

manpages/getutid_r.3.html
getutid_r(3) - access utmp file entries - Linux manual page
New applications should use the POSIX.1-specified utmpx versions of these functions; see CONFORMING TO. utmpname() sets the name of the utmp-format file for the

manpages/delete_module.2.html
delete_module(2) - delete a loadable module entry (ManPage)
The delete_module() system call attempts to remove the unused loadable module entry identified by name. If the module has an exit function, then that function i

manpages/pcap-tstamp.7.html
pcap-tstamp(7) packet time stamps in libpcap (Man Page).....
When capturing traffic, each packet is given a time stamp representing, for incoming packets, the arrival time of the packet and, for outgoing packets, the tran

manpages/sasl_getopt_t.3.html
sasl_getopt_t(3) - The SASL get option callback (Man Page)
sasl_getopt_t is used to retrieve an option, often mechanism specific, from the application. An example of this is requested what KERBEROS_V4 srvtab file to use

manpages/XineramaQueryVersion.3.html
XineramaQueryVersion(3) - API for Xinerama extension to X11
Xinerama is a simple library designed to interface the Xinerama Extension for retrieving information about physical output devices which may be combined into a





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