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_rwlock_init, 12 (pthread_rwlock_t *lock, const pthread_rwlockattr_t *attr), 13 return B_TO_POSITIVE_ERROR(sReal_pthread_rwlock_init(lock, attr)); 14 ) 15 16 17 WRAPPER_FUNCTION(int, pthread_rwlock_destroy, (pthread_rwlock_t *lock), 18 return B_TO_POSITIVE_ERROR(sReal_pthread_rwlock_destroy(lock)); 19 ) 20 21 22 WRAPPER_FUNCTION(int, pthread_rwlock_rdlock, (pthread_rwlock_t *lock), 23 return B_TO_POSITIVE_ERROR(sReal_pthread_rwlock_rdlock(lock)); 24 ) 25 26 27 WRAPPER_FUNCTION(int, pthread_rwlock_tryrdlock, (pthread_rwlock_t *lock), 28 return B_TO_POSITIVE_ERROR(sReal_pthread_rwlock_tryrdlock(lock)); 29 ) 30 31 32 WRAPPER_FUNCTION(int, pthread_rwlock_timedrdlock, 33 (pthread_rwlock_t *lock, const struct timespec *timeout), 34 return B_TO_POSITIVE_ERROR(sReal_pthread_rwlock_timedrdlock(lock, timeout)); 35 ) 36 37 38 WRAPPER_FUNCTION(int, pthread_rwlock_wrlock, (pthread_rwlock_t *lock), 39 return B_TO_POSITIVE_ERROR(sReal_pthread_rwlock_wrlock(lock)); 40 ) 41 42 43 WRAPPER_FUNCTION(int, pthread_rwlock_trywrlock, (pthread_rwlock_t *lock), 44 return B_TO_POSITIVE_ERROR(sReal_pthread_rwlock_trywrlock(lock)); 45 ) 46 47 48 WRAPPER_FUNCTION(int, pthread_rwlock_timedwrlock, 49 (pthread_rwlock_t *lock, const struct timespec *timeout), 50 return B_TO_POSITIVE_ERROR(sReal_pthread_rwlock_timedwrlock(lock, timeout)); 51 ) 52 53 54 WRAPPER_FUNCTION(int, pthread_rwlock_unlock, (pthread_rwlock_t *lock), 55 return B_TO_POSITIVE_ERROR(sReal_pthread_rwlock_unlock(lock)); 56 ) 57