xref: /haiku/src/libs/posix_error_mapper/pthread_mutexattr.cpp (revision 893988af824e65e49e55f517b157db8386e8002b)
1 /*
2  * Copyright 2009, Ingo Weinhold, ingo_weinhold@gmx.de.
3  * Distributed under the terms of the MIT License.
4  */
5 
6 #include <pthread.h>
7 
8 #include "posix_error_mapper.h"
9 
10 
11 WRAPPER_FUNCTION(int, pthread_mutexattr_destroy,
12 		(pthread_mutexattr_t *mutexAttr),
13 	return B_TO_POSITIVE_ERROR(sReal_pthread_mutexattr_destroy(mutexAttr));
14 )
15 
16 
17 WRAPPER_FUNCTION(int, pthread_mutexattr_getprioceiling,
18 		(pthread_mutexattr_t *mutexAttr, int *_priorityCeiling),
19 	return B_TO_POSITIVE_ERROR(sReal_pthread_mutexattr_getprioceiling(mutexAttr,
20 		_priorityCeiling));
21 )
22 
23 
24 WRAPPER_FUNCTION(int, pthread_mutexattr_getprotocol,
25 		(pthread_mutexattr_t *mutexAttr, int *_protocol),
26 	return B_TO_POSITIVE_ERROR(sReal_pthread_mutexattr_getprotocol(mutexAttr,
27 		_protocol));
28 )
29 
30 
31 WRAPPER_FUNCTION(int, pthread_mutexattr_getpshared,
32 		(pthread_mutexattr_t *mutexAttr, int *_processShared),
33 	return B_TO_POSITIVE_ERROR(sReal_pthread_mutexattr_getpshared(mutexAttr,
34 		_processShared));
35 )
36 
37 
38 WRAPPER_FUNCTION(int, pthread_mutexattr_gettype,
39 		(pthread_mutexattr_t *mutexAttr, int *_type),
40 	return B_TO_POSITIVE_ERROR(sReal_pthread_mutexattr_gettype(mutexAttr,
41 		_type));
42 )
43 
44 
45 WRAPPER_FUNCTION(int, pthread_mutexattr_init,
46 		(pthread_mutexattr_t *mutexAttr),
47 	return B_TO_POSITIVE_ERROR(sReal_pthread_mutexattr_init(mutexAttr));
48 )
49 
50 
51 WRAPPER_FUNCTION(int, pthread_mutexattr_setprioceiling,
52 		(pthread_mutexattr_t *mutexAttr, int priorityCeiling),
53 	return B_TO_POSITIVE_ERROR(sReal_pthread_mutexattr_setprioceiling(mutexAttr,
54 		priorityCeiling));
55 )
56 
57 
58 WRAPPER_FUNCTION(int, pthread_mutexattr_setprotocol,
59 		(pthread_mutexattr_t *mutexAttr, int protocol),
60 	return B_TO_POSITIVE_ERROR(sReal_pthread_mutexattr_setprotocol(mutexAttr,
61 		protocol));
62 )
63 
64 
65 WRAPPER_FUNCTION(int, pthread_mutexattr_setpshared,
66 		(pthread_mutexattr_t *mutexAttr, int processShared),
67 	return B_TO_POSITIVE_ERROR(sReal_pthread_mutexattr_setpshared(mutexAttr,
68 		processShared));
69 )
70 
71 
72 WRAPPER_FUNCTION(int, pthread_mutexattr_settype,
73 		(pthread_mutexattr_t *mutexAttr, int type),
74 	return B_TO_POSITIVE_ERROR(sReal_pthread_mutexattr_settype(mutexAttr,
75 		type));
76 )
77