2 * Copyright 2009, Ingo Weinhold, ingo_weinhold@gmx.de.
3 * Distributed under the terms of the MIT License.
8 #include "posix_error_mapper.h"
11 WRAPPER_FUNCTION(int, pthread_mutex_destroy
, (pthread_mutex_t
*mutex
),
12 return B_TO_POSITIVE_ERROR(sReal_pthread_mutex_destroy(mutex
));
16 WRAPPER_FUNCTION(int, pthread_mutex_getprioceiling
,
17 (const pthread_mutex_t
*mutex
, int *_priorityCeiling
),
18 return B_TO_POSITIVE_ERROR(sReal_pthread_mutex_getprioceiling(mutex
,
23 WRAPPER_FUNCTION(int, pthread_mutex_init
,
24 (pthread_mutex_t
*mutex
, const pthread_mutexattr_t
*attr
),
25 return B_TO_POSITIVE_ERROR(sReal_pthread_mutex_init(mutex
, attr
));
29 WRAPPER_FUNCTION(int, pthread_mutex_lock
, (pthread_mutex_t
*mutex
),
30 return B_TO_POSITIVE_ERROR(sReal_pthread_mutex_lock(mutex
));
34 WRAPPER_FUNCTION(int, pthread_mutex_setprioceiling
,
35 (pthread_mutex_t
*mutex
, int newPriorityCeiling
,
36 int *_oldPriorityCeiling
),
37 return B_TO_POSITIVE_ERROR(sReal_pthread_mutex_setprioceiling(mutex
,
38 newPriorityCeiling
, _oldPriorityCeiling
));
42 WRAPPER_FUNCTION(int, pthread_mutex_timedlock
,
43 (pthread_mutex_t
*mutex
, const struct timespec
*spec
),
44 return B_TO_POSITIVE_ERROR(sReal_pthread_mutex_timedlock(mutex
, spec
));
48 WRAPPER_FUNCTION(int, pthread_mutex_trylock
, (pthread_mutex_t
*mutex
),
49 return B_TO_POSITIVE_ERROR(sReal_pthread_mutex_trylock(mutex
));
53 WRAPPER_FUNCTION(int, pthread_mutex_unlock
, (pthread_mutex_t
*mutex
),
54 return B_TO_POSITIVE_ERROR(sReal_pthread_mutex_unlock(mutex
));