xref: /aosp_15_r20/external/musl/src/thread/pthread_rwlockattr_setpshared.c (revision c9945492fdd68bbe62686c5b452b4dc1be3f8453)
1*c9945492SAndroid Build Coastguard Worker #include "pthread_impl.h"
2*c9945492SAndroid Build Coastguard Worker 
pthread_rwlockattr_setpshared(pthread_rwlockattr_t * a,int pshared)3*c9945492SAndroid Build Coastguard Worker int pthread_rwlockattr_setpshared(pthread_rwlockattr_t *a, int pshared)
4*c9945492SAndroid Build Coastguard Worker {
5*c9945492SAndroid Build Coastguard Worker 	if (pshared > 1U) return EINVAL;
6*c9945492SAndroid Build Coastguard Worker 	a->__attr[0] = pshared;
7*c9945492SAndroid Build Coastguard Worker 	return 0;
8*c9945492SAndroid Build Coastguard Worker }
9