Rev 131 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 131 | Rev 141 | ||
---|---|---|---|
Line 343... | Line 343... | ||
343 | 343 | ||
344 | <para>A thread that causes the condition become true signals this event |
344 | <para>A thread that causes the condition become true signals this event |
345 | like this:</para> |
345 | like this:</para> |
346 | 346 | ||
347 | <example> |
347 | <example> |
348 | <title>Use of <code>condvar_signal</code>.</title> |
348 | <title>Use of <code>condvar_signal()</code>.</title> |
349 | 349 | ||
350 | <programlisting language="C"><function>mutex_lock</function>(<varname>mtx</varname>); |
350 | <programlisting language="C"><function>mutex_lock</function>(<varname>mtx</varname>); |
351 | <varname>condition</varname> = <constant>true</constant>; |
351 | <varname>condition</varname> = <constant>true</constant>; |
352 | <function>condvar_signal</function>(<varname>cv</varname>); /* <remark>condvar_broadcast(cv);</remark> */ |
352 | <function>condvar_signal</function>(<varname>cv</varname>); /* <remark>condvar_broadcast(cv);</remark> */ |
353 | <function>mutex_unlock</function>(<varname>mtx</varname>);</programlisting> |
353 | <function>mutex_unlock</function>(<varname>mtx</varname>);</programlisting> |