提交 cc2e0b45 编写于 作者: R Rich Felker

implement pthread_rwlockattr_* (essentially no-ops)

上级 b4d40e44
#include "pthread_impl.h"
int pthread_rwlockattr_destroy(pthread_rwlockattr_t *a)
{
return 0;
}
#include "pthread_impl.h"
int pthread_rwlockattr_getpshared(const pthread_rwlockattr_t *a, int *pshared)
{
*pshared = *(int *)a;
return 0;
}
#include "pthread_impl.h"
int pthread_rwlockattr_init(pthread_rwlockattr_t *a)
{
memset(a, 0, sizeof *a);
return 0;
}
#include "pthread_impl.h"
int pthread_rwlockattr_setpshared(pthread_rwlockattr_t *a, int pshared)
{
if (pshared > 1U) return EINVAL;
*(int *)a = pshared;
return 0;
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册