summaryrefslogtreecommitdiff
path: root/src/thread/pthread_mutexattr_setrobust.c
blob: 4a296ba11890d1dae8766697deedfc526dcf3864 (plain) (blame)
1
2
3
4
5
6
7
8
9
#include "pthread_impl.h"

int pthread_mutexattr_setrobust(pthread_mutexattr_t *a, int robust)
{
	if (robust > 1U) return EINVAL;
	*a &= ~4;
	*a |= robust*4;
	return 0;
}