VMS Help  —  CRTL  putchar_unlocked, Description
    The reentrant version of the putchar function is locked against
    multiple threads calling it simultaneously. This incurs overhead
    to ensure integrity of the output stream. The unlocked version of
    this call, putchar_unlocked can be used to avoid the overhead.
    The putchar_unlocked function is functionally identical to
    the putchar function, except that it is not required to be
    implemented in a thread-safe manner. The putchar_unlocked
    function 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 putchar_
    unlocked is used.

    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.
Close Help