Blame nptl/tst-mutexpi6.c
|
Packit Service |
82fcde |
#include <pthread.h>
|
|
Packit Service |
82fcde |
#include <stdio.h>
|
|
Packit Service |
82fcde |
#include <stdlib.h>
|
|
Packit Service |
82fcde |
|
|
Packit Service |
82fcde |
|
|
Packit Service |
82fcde |
pthread_mutexattr_t a;
|
|
Packit Service |
82fcde |
pthread_mutexattr_t *attr;
|
|
Packit Service |
82fcde |
|
|
Packit Service |
82fcde |
static void
|
|
Packit Service |
82fcde |
prepare (void)
|
|
Packit Service |
82fcde |
{
|
|
Packit Service |
82fcde |
attr = &a;
|
|
Packit Service |
82fcde |
if (pthread_mutexattr_init (&a) != 0)
|
|
Packit Service |
82fcde |
{
|
|
Packit Service |
82fcde |
puts ("mutexattr_init failed");
|
|
Packit Service |
82fcde |
exit (1);
|
|
Packit Service |
82fcde |
}
|
|
Packit Service |
82fcde |
|
|
Packit Service |
82fcde |
if (pthread_mutexattr_setprotocol (&a, PTHREAD_PRIO_INHERIT) != 0)
|
|
Packit Service |
82fcde |
{
|
|
Packit Service |
82fcde |
puts ("mutexattr_setprotocol failed");
|
|
Packit Service |
82fcde |
exit (1);
|
|
Packit Service |
82fcde |
}
|
|
Packit Service |
82fcde |
}
|
|
Packit Service |
82fcde |
#define PREPARE(argc, argv) prepare ()
|
|
Packit Service |
82fcde |
|
|
Packit Service |
82fcde |
|
|
Packit Service |
82fcde |
#define ATTR attr
|
|
Packit Service |
82fcde |
#include "tst-mutex6.c"
|