Re: pthread_mutex_init() with gcc-3.4.3 on Tru64 UNIX

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On Fri, 8 Jul 2005, Albert Chin wrote:

> $ uname -a
> OSF1 [name] V4.0 878 alpha
> $ uname -a
> OSF1 [name] V5.1 732 alpha
>
> $ cat mutex.c
> #include <stdlib.h>
> #include <pthread.h>
>
> int
> main (void) {
>   pthread_mutex_t lck;
>
>   if (pthread_mutex_init(&lck, 0) != 0)
>     exit (2);
>   if (pthread_mutex_lock(&lck) != 0)
>     exit (3);
>   if (pthread_mutex_unlock(&lck) != 0)
>     exit (4);
>   if (pthread_mutex_destroy(&lck) != 0)
>     exit (5);
>
>   exit (0);
> }
>
> $ cc mutex.c

Try cc mutex.c -lpthread

-ishwar

[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux