1<html lang="en"> 2<head> 3<title>putchar_unlocked - Untitled</title> 4<meta http-equiv="Content-Type" content="text/html"> 5<meta name="description" content="Untitled"> 6<meta name="generator" content="makeinfo 4.13"> 7<link title="Top" rel="start" href="index.html#Top"> 8<link rel="up" href="Stdio.html#Stdio" title="Stdio"> 9<link rel="prev" href="putchar.html#putchar" title="putchar"> 10<link rel="next" href="puts.html#puts" title="puts"> 11<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage"> 12<meta http-equiv="Content-Style-Type" content="text/css"> 13<style type="text/css"><!-- 14 pre.display { font-family:inherit } 15 pre.format { font-family:inherit } 16 pre.smalldisplay { font-family:inherit; font-size:smaller } 17 pre.smallformat { font-family:inherit; font-size:smaller } 18 pre.smallexample { font-size:smaller } 19 pre.smalllisp { font-size:smaller } 20 span.sc { font-variant:small-caps } 21 span.roman { font-family:serif; font-weight:normal; } 22 span.sansserif { font-family:sans-serif; font-weight:normal; } 23--></style> 24<link rel="stylesheet" type="text/css" href="../cs.css"> 25</head> 26<body> 27<div class="node"> 28<a name="putchar_unlocked"></a> 29<a name="putchar_005funlocked"></a> 30<p> 31Next: <a rel="next" accesskey="n" href="puts.html#puts">puts</a>, 32Previous: <a rel="previous" accesskey="p" href="putchar.html#putchar">putchar</a>, 33Up: <a rel="up" accesskey="u" href="Stdio.html#Stdio">Stdio</a> 34<hr> 35</div> 36 37<h3 class="section">4.47 <code>putchar_unlocked</code>—non-thread-safe version of putchar (macro)</h3> 38 39<p><a name="index-putchar_005funlocked-252"></a><strong>Synopsis</strong> 40<pre class="example"> #include <stdio.h> 41 int putchar_unlocked(int <var>ch</var>); 42 43</pre> 44 <p><strong>Description</strong><br> 45<code>putchar_unlocked</code> is a non-thread-safe version of <code>putchar</code> 46declared in <code>stdio.h</code>. <code>putchar_unlocked</code> may only safely be used 47within a scope protected by flockfile() (or ftrylockfile()) and 48funlockfile(). These functions may safely be used in a multi-threaded 49program if and only if they are called while the invoking thread owns 50the ( FILE *) object, as is the case after a successful call to the 51flockfile() or ftrylockfile() functions. If threads are disabled, 52then <code>putchar_unlocked</code> is equivalent to <code>putchar</code>. 53 54 <p><br> 55<strong>Returns</strong><br> 56See <code>putchar</code>. 57 58 <p><br> 59<strong>Portability</strong><br> 60POSIX 1003.1 requires <code>putchar_unlocked</code>. <code>putchar_unlocked</code> may 61be implemented as a macro. 62 63 <p>Supporting OS subroutines required: <code>close</code>, <code>fstat</code>, <code>isatty</code>, 64<code>lseek</code>, <code>read</code>, <code>sbrk</code>, <code>write</code>. 65<br> 66 67 </body></html> 68 69