% % This file was automatically produced at Feb 27 2003, 22:51:56 by % c2latex mutex2.c % \expandafter\ifx\csname indentation\endcsname\relax% \newlength{\indentation}\fi \setlength{\indentation}{0.5em} \begin{flushleft} {\bf int} main() \{\mbox{}\\ \hspace*{8\indentation}pthread\_t threads[ NUM\_THREADS ];\mbox{}\\ \hspace*{8\indentation}{\bf int} rc, t;\mbox{}\\ \hspace*{8\indentation}{\bf for} ( t = 0; t $<$ NUM\_THREADS; t++ ) \{\mbox{}\\ \hspace*{16\indentation}printf( {\tt"Creating thread \%d$\backslash$n"}, t );\mbox{}\\ \hspace*{16\indentation}pthread\_create( \&threads[ t ], NULL, thread,\mbox{}\\ \hspace*{32\indentation}( {\bf void} $\ast$ ) t );\mbox{}\\ \hspace*{8\indentation}\}\mbox{}\\ \hspace*{8\indentation}pthread\_exit( NULL );\mbox{}\\ \}\mbox{}\\ \end{flushleft}