diff --git a/src/libs/posix_error_mapper/Jamfile b/src/libs/posix_error_mapper/Jamfile index 0218cf86aa..e20e27f027 100644 --- a/src/libs/posix_error_mapper/Jamfile +++ b/src/libs/posix_error_mapper/Jamfile @@ -12,4 +12,5 @@ StaticLibrary libposix_error_mapper.a : pthread_rwlock.cpp pthread_specific.cpp pthread_thread.cpp + signal.cpp ; diff --git a/src/libs/posix_error_mapper/pthread_attr.cpp b/src/libs/posix_error_mapper/pthread_attr.cpp index 5436eb6f1f..163220afeb 100644 --- a/src/libs/posix_error_mapper/pthread_attr.cpp +++ b/src/libs/posix_error_mapper/pthread_attr.cpp @@ -1,8 +1,9 @@ /* - * Copyright 2009, Ingo Weinhold, ingo_weinhold@gmx.de. + * Copyright 2009-2010, Ingo Weinhold, ingo_weinhold@gmx.de. * Distributed under the terms of the MIT License. */ + #include #include "posix_error_mapper.h" @@ -58,3 +59,17 @@ WRAPPER_FUNCTION(int, pthread_attr_setscope, return B_TO_POSITIVE_ERROR(sReal_pthread_attr_setscope(attr, contentionScope)); ) + + +WRAPPER_FUNCTION(int, pthread_attr_setschedparam, + (pthread_attr_t *attr, const struct sched_param *param), + return B_TO_POSITIVE_ERROR(sReal_pthread_attr_setschedparam(attr, + param)); +) + + +WRAPPER_FUNCTION(int, pthread_attr_getschedparam, + (const pthread_attr_t *attr, struct sched_param *param), + return B_TO_POSITIVE_ERROR(sReal_pthread_attr_getschedparam(attr, + param)); +) diff --git a/src/libs/posix_error_mapper/pthread_thread.cpp b/src/libs/posix_error_mapper/pthread_thread.cpp index f3deb38d35..7fcca73b96 100644 --- a/src/libs/posix_error_mapper/pthread_thread.cpp +++ b/src/libs/posix_error_mapper/pthread_thread.cpp @@ -1,8 +1,9 @@ /* - * Copyright 2009, Ingo Weinhold, ingo_weinhold@gmx.de. + * Copyright 2009-2010, Ingo Weinhold, ingo_weinhold@gmx.de. * Distributed under the terms of the MIT License. */ + #include #include "posix_error_mapper.h" @@ -50,3 +51,17 @@ WRAPPER_FUNCTION(int, pthread_setcancelstate, WRAPPER_FUNCTION(int, pthread_setcanceltype, (int type, int *_oldType), return B_TO_POSITIVE_ERROR(sReal_pthread_setcanceltype(type, _oldType)); ) + + +WRAPPER_FUNCTION(int, pthread_getschedparam, + (pthread_t thread, int *policy, struct sched_param *param), + return B_TO_POSITIVE_ERROR(sReal_pthread_getschedparam(thread, policy, + param)); +) + + +WRAPPER_FUNCTION(int, pthread_setschedparam, + (pthread_t thread, int policy, const struct sched_param *param), + return B_TO_POSITIVE_ERROR(sReal_pthread_setschedparam(thread, policy, + param)); +) diff --git a/src/libs/posix_error_mapper/signal.cpp b/src/libs/posix_error_mapper/signal.cpp new file mode 100644 index 0000000000..eac3a8012b --- /dev/null +++ b/src/libs/posix_error_mapper/signal.cpp @@ -0,0 +1,15 @@ +/* + * Copyright 2010, Ingo Weinhold, ingo_weinhold@gmx.de. + * Distributed under the terms of the MIT License. + */ + + +#include + +#include "posix_error_mapper.h" + + +WRAPPER_FUNCTION(int, pthread_sigmask, + (int how, const sigset_t *set, sigset_t *oldSet), + return B_TO_POSITIVE_ERROR(sReal_pthread_sigmask(how, set, oldSet)); +)