flockfile - Locks a stdio stream
Standard C Library (libc.a)
FILE * file );
Interfaces documented on this reference page conform to industry standards as follows:
Refer to the standards(5) reference page for more information about industry standards and associated tags.
Specifies the stream to be locked.
The flockfile() function locks a stdio stream so that a thread can have exclusive use of that stream for multiple I/O operations. Use the flockfile() function for a thread that wishes to ensure that the output of several printf() functions, for example, is not garbled by another thread also trying to use printf().
Matching flockfile() and funlockfile() calls can be nested.
The behavior of the flockfile() function is unspecified if the file parameter does not point to a valid FILE structure.
Functions: funlockfile(3), getc_unlocked(3), putc_unlocked(3) delim off