mirror of
git://git.musl-libc.org/musl
synced 2024-12-14 18:55:23 +00:00
implement pthread_rwlockattr_* (essentially no-ops)
This commit is contained in:
parent
b4d40e44e3
commit
cc2e0b45a6
6
src/thread/pthread_rwlockattr_destroy.c
Normal file
6
src/thread/pthread_rwlockattr_destroy.c
Normal file
@ -0,0 +1,6 @@
|
||||
#include "pthread_impl.h"
|
||||
|
||||
int pthread_rwlockattr_destroy(pthread_rwlockattr_t *a)
|
||||
{
|
||||
return 0;
|
||||
}
|
7
src/thread/pthread_rwlockattr_getpshared.c
Normal file
7
src/thread/pthread_rwlockattr_getpshared.c
Normal file
@ -0,0 +1,7 @@
|
||||
#include "pthread_impl.h"
|
||||
|
||||
int pthread_rwlockattr_getpshared(const pthread_rwlockattr_t *a, int *pshared)
|
||||
{
|
||||
*pshared = *(int *)a;
|
||||
return 0;
|
||||
}
|
7
src/thread/pthread_rwlockattr_init.c
Normal file
7
src/thread/pthread_rwlockattr_init.c
Normal file
@ -0,0 +1,7 @@
|
||||
#include "pthread_impl.h"
|
||||
|
||||
int pthread_rwlockattr_init(pthread_rwlockattr_t *a)
|
||||
{
|
||||
memset(a, 0, sizeof *a);
|
||||
return 0;
|
||||
}
|
8
src/thread/pthread_rwlockattr_setpshared.c
Normal file
8
src/thread/pthread_rwlockattr_setpshared.c
Normal file
@ -0,0 +1,8 @@
|
||||
#include "pthread_impl.h"
|
||||
|
||||
int pthread_rwlockattr_setpshared(pthread_rwlockattr_t *a, int pshared)
|
||||
{
|
||||
if (pshared > 1U) return EINVAL;
|
||||
*(int *)a = pshared;
|
||||
return 0;
|
||||
}
|
Loading…
Reference in New Issue
Block a user