See the putc_unlocked macro. Compiling with the __UNIX_PUTC macro defined enables an optimization that uses a faster, inlined version of this function. See also flockfile, ftrylockfile, and funlockfile.