HaikuDepot: notify work status from main window
[haiku.git] / src / libs / posix_error_mapper / pthread_mutex.cpp
blobe80c824a1973332bca6efab298a04a82d4d54aeb
1 /*
2 * Copyright 2009, Ingo Weinhold, ingo_weinhold@gmx.de.
3 * Distributed under the terms of the MIT License.
4 */
6 #include <pthread.h>
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,
19 _priorityCeiling));
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));