xref: /haiku/src/libs/posix_error_mapper/pthread_attr.cpp (revision 28d1701896024a3d36a7982992e0952b6bc699be)
1 /*
2  * Copyright 2009-2010, Ingo Weinhold, ingo_weinhold@gmx.de.
3  * Distributed under the terms of the MIT License.
4  */
5 
6 
7 #include <pthread.h>
8 
9 #include "posix_error_mapper.h"
10 
11 
12 WRAPPER_FUNCTION(int, pthread_attr_destroy, (pthread_attr_t *attr),
13 	return B_TO_POSITIVE_ERROR(sReal_pthread_attr_destroy(attr));
14 )
15 
16 
17 WRAPPER_FUNCTION(int, pthread_attr_init, (pthread_attr_t *attr),
18 	return B_TO_POSITIVE_ERROR(sReal_pthread_attr_init(attr));
19 )
20 
21 
22 WRAPPER_FUNCTION(int, pthread_attr_getdetachstate,
23 		(const pthread_attr_t *attr, int *detachstate),
24 	return B_TO_POSITIVE_ERROR(sReal_pthread_attr_getdetachstate(attr,
25 		detachstate));
26 )
27 
28 
29 WRAPPER_FUNCTION(int, pthread_attr_setdetachstate,
30 		(pthread_attr_t *attr, int detachstate),
31 	return B_TO_POSITIVE_ERROR(sReal_pthread_attr_setdetachstate(attr,
32 		detachstate));
33 )
34 
35 
36 WRAPPER_FUNCTION(int, pthread_attr_getstacksize,
37 		(const pthread_attr_t *attr, size_t *stacksize),
38 	return B_TO_POSITIVE_ERROR(sReal_pthread_attr_getstacksize(attr,
39 		stacksize));
40 )
41 
42 
43 WRAPPER_FUNCTION(int, pthread_attr_setstacksize,
44 		(pthread_attr_t *attr, size_t stacksize),
45 	return B_TO_POSITIVE_ERROR(sReal_pthread_attr_setstacksize(attr,
46 		stacksize));
47 )
48 
49 
50 WRAPPER_FUNCTION(int, pthread_attr_getscope,
51 		(const pthread_attr_t *attr, int *contentionScope),
52 	return B_TO_POSITIVE_ERROR(sReal_pthread_attr_getscope(attr,
53 		contentionScope));
54 )
55 
56 
57 WRAPPER_FUNCTION(int, pthread_attr_setscope,
58 		(pthread_attr_t *attr, int contentionScope),
59 	return B_TO_POSITIVE_ERROR(sReal_pthread_attr_setscope(attr,
60 		contentionScope));
61 )
62 
63 
64 WRAPPER_FUNCTION(int, pthread_attr_setschedparam,
65 		(pthread_attr_t *attr, const struct sched_param *param),
66 	return B_TO_POSITIVE_ERROR(sReal_pthread_attr_setschedparam(attr,
67 		param));
68 )
69 
70 
71 WRAPPER_FUNCTION(int, pthread_attr_getschedparam,
72 		(const pthread_attr_t *attr, struct sched_param *param),
73 	return B_TO_POSITIVE_ERROR(sReal_pthread_attr_getschedparam(attr,
74 		param));
75 )
76 
77 
78 WRAPPER_FUNCTION(int, pthread_attr_getguardsize,
79 		(const pthread_attr_t *attr, size_t *guardsize),
80 	return B_TO_POSITIVE_ERROR(sReal_pthread_attr_getguardsize(attr,
81 		guardsize));
82 )
83 
84 
85 WRAPPER_FUNCTION(int, pthread_attr_setguardsize,
86 		(pthread_attr_t *attr, size_t guardsize),
87 	return B_TO_POSITIVE_ERROR(sReal_pthread_attr_setguardsize(attr,
88 		guardsize));
89 )
90