1#include "stdio_impl.h"
2
3int putc(int c, FILE* f) {
4    if (atomic_load(&f->lock) < 0 || !__lockfile(f))
5        return putc_unlocked(c, f);
6    c = putc_unlocked(c, f);
7    __unlockfile(f);
8    return c;
9}
10
11weak_alias(putc, _IO_putc);
12