VMS Help
CRTL, fgetc_unlocked
*Conan The Librarian
|
Same as the fgetc function, 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 fgetc_unlocked (FILE *file_ptr);
file_ptr
A file pointer.
The reentrant version of the fgetc function is locked against
multiple threads calling it simultaneously. This incurs overhead
to ensure integrity of the stream. The unlocked version of this
call, fgetc_unlocked can be used to avoid the overhead. The
fgetc_unlocked function is functionally identical to the fgetc
function, except that fgetc_unlocked 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 fgetc_unlocked is used.
Compiling with the __UNIX_PUTC macro defined enables an
optimization that uses a faster, inlined version of this
function.
See also getc_unlocked, flockfile, ftrylockfile, and funlockfile.
n The returned character.
EOF Indicates the end-of-file or an error.