Your Browser is not longer supported
Please use Google Chrome, Mozilla Firefox or Microsoft Edge to view the page correctly
Loading...
{{viewport.spaceProperty.prod}}
getc_unlocked, getchar_unlocked, putc_unlocked, putchar_unlocked - standard I/O with explicit lock by the client
&pagelevel(4)&pagelevel
Syntax | #include <stdio.h> int getc_unlocked(FILE *stream); int getchar_unlocked(void); int putc_unlocked(int c, FILE *stream); int putchar_unlocked(int c); |
Description | The functions getc_unlocked(), getchar_unlocked(), putc_unlocked() and putchar_unlocked() are functionally equivalent to the original versions getc(), getchar(), putc() und putchar() except that it is not implemented as a thread-safe function. For this reason, it can only be safely used in a multithread program if the thread that calls it owns the corresponding (FILE *) object. This is the case after successfully calling the flockfile() or
ftrylockfile()
functions. |
Return val. | See getc(), getchar() [(both in getc() ], putc() and putchar() [both in putc() ]. |
See also | getc(), putc(), flockfile(), pthread_intro(), stdio().
|