VMS Help
CRTL, getchar_unlocked
*Conan The Librarian
|
Same as getchar, except used only within a scope protected by
flockfile and funlockfile.
This function is supported on OpenVMS Integrity servers and
Alpha only.
Format
#include <stdio.h>
int getchar_unlocked (void);
The reentrant version of the getchar function is locked against
multiple threads calling it simultaneously. This incurs overhead
to ensure integrity of the input stream. The unlocked version of
this call, getchar_unlocked can be used to avoid the overhead.
The getchar_unlocked function is functionally identical to
the getchar function, except that it is not required to be
implemented in a thread-safe manner. The getchar_unlocked
function can be safely used only within a scope that is protected
by the flockfile and funlockfile functions used as a pair. The
caller must ensure that the stream is locked before getchar_
unlocked is used.
See also flockfile, ftrylockfile, and funlockfile.
x The next character from stdin, converted to
int.
EOF Indicates the end-of-file or an error.