xref: /haiku/src/libs/posix_error_mapper/pthread_rwlockattr.cpp (revision 39d58e2f49f4b073ded3dbf639fd55730fa520a0)
1*39d58e2fSIngo Weinhold /*
2*39d58e2fSIngo Weinhold  * Copyright 2009, Ingo Weinhold, ingo_weinhold@gmx.de.
3*39d58e2fSIngo Weinhold  * Distributed under the terms of the MIT License.
4*39d58e2fSIngo Weinhold  */
5*39d58e2fSIngo Weinhold 
6*39d58e2fSIngo Weinhold #include <pthread.h>
7*39d58e2fSIngo Weinhold 
8*39d58e2fSIngo Weinhold #include "posix_error_mapper.h"
9*39d58e2fSIngo Weinhold 
10*39d58e2fSIngo Weinhold 
11*39d58e2fSIngo Weinhold WRAPPER_FUNCTION(int, pthread_rwlockattr_init,
12*39d58e2fSIngo Weinhold 		(pthread_rwlockattr_t *attr),
13*39d58e2fSIngo Weinhold 	return B_TO_POSITIVE_ERROR(sReal_pthread_rwlockattr_init(attr));
14*39d58e2fSIngo Weinhold )
15*39d58e2fSIngo Weinhold 
16*39d58e2fSIngo Weinhold 
17*39d58e2fSIngo Weinhold WRAPPER_FUNCTION(int, pthread_rwlockattr_destroy,
18*39d58e2fSIngo Weinhold 		(pthread_rwlockattr_t *attr),
19*39d58e2fSIngo Weinhold 	return B_TO_POSITIVE_ERROR(sReal_pthread_rwlockattr_destroy(attr));
20*39d58e2fSIngo Weinhold )
21*39d58e2fSIngo Weinhold 
22*39d58e2fSIngo Weinhold 
23*39d58e2fSIngo Weinhold WRAPPER_FUNCTION(int, pthread_rwlockattr_getpshared,
24*39d58e2fSIngo Weinhold 		(const pthread_rwlockattr_t *attr, int *shared),
25*39d58e2fSIngo Weinhold 	return B_TO_POSITIVE_ERROR(sReal_pthread_rwlockattr_getpshared(attr,
26*39d58e2fSIngo Weinhold 		shared));
27*39d58e2fSIngo Weinhold )
28*39d58e2fSIngo Weinhold 
29*39d58e2fSIngo Weinhold 
30*39d58e2fSIngo Weinhold WRAPPER_FUNCTION(int, pthread_rwlockattr_setpshared,
31*39d58e2fSIngo Weinhold 		(pthread_rwlockattr_t *attr, int shared),
32*39d58e2fSIngo Weinhold 	return B_TO_POSITIVE_ERROR(sReal_pthread_rwlockattr_setpshared(attr,
33*39d58e2fSIngo Weinhold 		shared));
34*39d58e2fSIngo Weinhold )
35