A>
, <A HREF="pthread_cancel.html"><B>pthread_cancel(3)</B></A>. 
</P>
<H2><A HREF="#toc9" NAME="sect9">Example</A></H2>
<P>Consider two shared variables <I>x</I> and <I>y</I>, protected by
the mutex <I>mut</I>, and a condition variable <I>cond</I> that is to
be signaled whenever <I>x</I> becomes greater than <I>y</I>. 
</P>
<PRE STYLE="margin-left: 1cm; margin-right: 1cm">int x,y;
pthread_mutex_t mut = PTHREAD_MUTEX_INITIALIZER;
pthread_cond_t cond = PTHREAD_COND_INITIALIZER;</PRE><BLOCKQUOTE>
Waiting unti