1 /* Copyright (C) 2004 Manuel Novoa III <mjn3@codepoet.org>
3 * GNU Library General Public License (LGPL) version 2 or later.
5 * Dedicated to Toni. See uClibc/DEDICATION.mjn3 for details.
14 #undef putchar_unlocked
15 int putchar_unlocked(int c
)
17 register FILE *stream
= stdout
;
19 return __PUTC_UNLOCKED_MACRO(c
, stream
);
22 #ifndef __UCLIBC_HAS_THREADS__
23 strong_alias(putchar_unlocked
,putchar
)
26 #elif defined __UCLIBC_HAS_THREADS__
30 register FILE *stream
= stdout
;
32 if (stream
->__user_locking
!= 0) {
33 return __PUTC_UNLOCKED_MACRO(c
, stream
);
36 __STDIO_ALWAYS_THREADLOCK(stream
);
37 retval
= __PUTC_UNLOCKED_MACRO(c
, stream
);
38 __STDIO_ALWAYS_THREADUNLOCK(stream
);