I should have pasted this code

$ cat pthread_mutex.c 
#include <pthread.h>

int main()
{
        pthread_mutex_t     m;
        pthread_mutexattr_t attr;

        pthread_mutexattr_init(&attr);
        pthread_mutexattr_setprotocol(&attr, PTHREAD_PRIO_INHERIT);

        pthread_mutex_init(&m, &attr);
        return 0;
}

$ gcc -o pthread_mutex pthread_mutex.c -lpthread
pthread_mutex.c: In function ‘main’:
pthread_mutex.c:9:39: error: ‘PTHREAD_PRIO_INHERIT’ undeclared (first use in 
this function)
pthread_mutex.c:9:39: note: each undeclared identifier is reported only once 
for each function it appears in

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1099189

Title:
  Fwd: Missing pthread_mutexattr_t and related constants/APIs

To manage notifications about this bug go to:
https://bugs.launchpad.net/glibc/+bug/1099189/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to