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_attr_destroy, (pthread_attr_t *attr), 12 return B_TO_POSITIVE_ERROR(sReal_pthread_attr_destroy(attr)); 13 ) 14 15 16 WRAPPER_FUNCTION(int, pthread_attr_init, (pthread_attr_t *attr), 17 return B_TO_POSITIVE_ERROR(sReal_pthread_attr_init(attr)); 18 ) 19 20 21 WRAPPER_FUNCTION(int, pthread_attr_getdetachstate, 22 (const pthread_attr_t *attr, int *detachstate), 23 return B_TO_POSITIVE_ERROR(sReal_pthread_attr_getdetachstate(attr, 24 detachstate)); 25 ) 26 27 28 WRAPPER_FUNCTION(int, pthread_attr_setdetachstate, 29 (pthread_attr_t *attr, int detachstate), 30 return B_TO_POSITIVE_ERROR(sReal_pthread_attr_setdetachstate(attr, 31 detachstate)); 32 ) 33 34 35 WRAPPER_FUNCTION(int, pthread_attr_getstacksize, 36 (const pthread_attr_t *attr, size_t *stacksize), 37 return B_TO_POSITIVE_ERROR(sReal_pthread_attr_getstacksize(attr, 38 stacksize)); 39 ) 40 41 42 WRAPPER_FUNCTION(int, pthread_attr_setstacksize, 43 (pthread_attr_t *attr, size_t stacksize), 44 return B_TO_POSITIVE_ERROR(sReal_pthread_attr_setstacksize(attr, 45 stacksize)); 46 ) 47 48 49 WRAPPER_FUNCTION(int, pthread_attr_getscope, 50 (const pthread_attr_t *attr, int *contentionScope), 51 return B_TO_POSITIVE_ERROR(sReal_pthread_attr_getscope(attr, 52 contentionScope)); 53 ) 54 55 56 WRAPPER_FUNCTION(int, pthread_attr_setscope, 57 (pthread_attr_t *attr, int contentionScope), 58 return B_TO_POSITIVE_ERROR(sReal_pthread_attr_setscope(attr, 59 contentionScope)); 60 ) 61