Back to index

glibc  2.9
tst-mutexpi6.c
Go to the documentation of this file.
00001 #include <pthread.h>
00002 #include <stdio.h>
00003 #include <stdlib.h>
00004 
00005 
00006 static pthread_mutexattr_t a;
00007 
00008 static void
00009 prepare (void)
00010 {
00011   if (pthread_mutexattr_init (&a) != 0)
00012     {
00013       puts ("mutexattr_init failed");
00014       exit (1);
00015     }
00016 
00017   if (pthread_mutexattr_setprotocol (&a, PTHREAD_PRIO_INHERIT) != 0)
00018     {
00019       puts ("mutexattr_setprotocol failed");
00020       exit (1);
00021     }
00022 }
00023 #define PREPARE(argc, argv) prepare ()
00024 
00025 
00026 #define ATTR &a
00027 #include "tst-mutex6.c"