提交 1d6b1f15 编写于 作者: R Rich Felker

implement pthread_mutexattr_[gs]etpshared functions

上级 9d5251f7
#include "pthread_impl.h"
int pthread_mutexattr_getpshared(const pthread_mutexattr_t *a, int *pshared)
{
*pshared = *a>>31;
return 0;
}
#include "pthread_impl.h"
int pthread_mutexattr_setpshared(pthread_mutexattr_t *a, int pshared)
{
if (pshared > 1U) return EINVAL;
*a &= 0x7fffffff;
*a |= pshared<<31;
return 0;
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册