Make UEFI boot-platform build again
[haiku.git] / src / libs / posix_error_mapper / pthread_thread.cpp
blob4d66a91e70796cf9711197948de31372e2bb5651
1 /*
2 * Copyright 2009-2011, Ingo Weinhold, ingo_weinhold@gmx.de.
3 * Distributed under the terms of the MIT License.
4 */
7 #include <pthread.h>
8 #include <signal.h>
10 #include "posix_error_mapper.h"
13 WRAPPER_FUNCTION(int, pthread_create,
14 (pthread_t *thread, const pthread_attr_t *attr,
15 void *(*start_routine)(void*), void *arg),
16 return B_TO_POSITIVE_ERROR(sReal_pthread_create(thread, attr, start_routine,
17 arg));
21 WRAPPER_FUNCTION(int, pthread_detach, (pthread_t thread),
22 return B_TO_POSITIVE_ERROR(sReal_pthread_detach(thread));
26 WRAPPER_FUNCTION(int, pthread_join, (pthread_t thread, void **_value),
27 return B_TO_POSITIVE_ERROR(sReal_pthread_join(thread, _value));
31 WRAPPER_FUNCTION(int, pthread_kill, (pthread_t thread, int sig),
32 return B_TO_POSITIVE_ERROR(sReal_pthread_kill(thread, sig));
36 WRAPPER_FUNCTION(int, pthread_setconcurrency, (int newLevel),
37 return B_TO_POSITIVE_ERROR(sReal_pthread_setconcurrency(newLevel));
41 WRAPPER_FUNCTION(int, pthread_cancel, (pthread_t thread),
42 return B_TO_POSITIVE_ERROR(sReal_pthread_cancel(thread));
46 WRAPPER_FUNCTION(int, pthread_setcancelstate,
47 (int state, int *_oldState),
48 return B_TO_POSITIVE_ERROR(sReal_pthread_setcancelstate(state, _oldState));
52 WRAPPER_FUNCTION(int, pthread_setcanceltype, (int type, int *_oldType),
53 return B_TO_POSITIVE_ERROR(sReal_pthread_setcanceltype(type, _oldType));
57 WRAPPER_FUNCTION(int, pthread_getschedparam,
58 (pthread_t thread, int *policy, struct sched_param *param),
59 return B_TO_POSITIVE_ERROR(sReal_pthread_getschedparam(thread, policy,
60 param));
64 WRAPPER_FUNCTION(int, pthread_setschedparam,
65 (pthread_t thread, int policy, const struct sched_param *param),
66 return B_TO_POSITIVE_ERROR(sReal_pthread_setschedparam(thread, policy,
67 param));