Commit 394c23c6 authored by Rafaël Carré's avatar Rafaël Carré

Add pthread_condattr_(g,s)etpshared() for 2.1

They are used by pthread-rwlocks.c
parent 2503f5dc
......@@ -47,3 +47,24 @@ int pthread_condattr_destroy(pthread_condattr_t *attr)
return 0;
}
int pthread_condattr_getpshared(pthread_condattr_t *attr, int *pshared)
{
if (attr == NULL || pshared == NULL)
return EINVAL;
*pshared = *attr;
return 0;
}
int pthread_condattr_setpshared(pthread_condattr_t *attr, int pshared)
{
if (attr == NULL)
return EINVAL;
if (pshared != PTHREAD_PROCESS_SHARED &&
pshared != PTHREAD_PROCESS_PRIVATE)
return EINVAL;
*attr = pshared;
return 0;
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment