OpenBSD manual page server

Manual Page Search Parameters

GETC_UNLOCKED(3) Library Functions Manual GETC_UNLOCKED(3)

getc_unlocked, getchar_unlockedget next character from stream, efficiently

#include <stdio.h>

int
getc_unlocked(FILE *stream);

int
getchar_unlocked(void);

The () and () functions are equivalent to their locked counterparts, getc(3) and getchar(3). However, getc_unlocked() and getchar_unlocked() assume that the relevant stream has either been previously locked with flockfile(3), or that it will not be accessed by any other thread.

The return values are as described for getc(3) and getchar(3).

getc(3), getchar(3)

getc_unlocked() and getchar_unlocked() conform to ISO/IEC 9945-1 ANSI/IEEE (“POSIX”) Std 1003.1 Second Edition 1996-07-12.

September 14, 2015 OpenBSD-current