xref: /haiku/src/libs/posix_error_mapper/pthread_specific.cpp (revision b671e9bbdbd10268a042b4f4cc4317ccd03d105e)
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_key_create,
12 		(pthread_key_t *key, void (*destructorFunc)(void*)),
13 	return B_TO_POSITIVE_ERROR(sReal_pthread_key_create(key, destructorFunc));
14 )
15 
16 
17 WRAPPER_FUNCTION(int, pthread_key_delete, (pthread_key_t key),
18 	return B_TO_POSITIVE_ERROR(sReal_pthread_key_delete(key));
19 )
20 
21 
22 WRAPPER_FUNCTION(int, pthread_setspecific,
23 		(pthread_key_t key, const void *value),
24 	return B_TO_POSITIVE_ERROR(sReal_pthread_setspecific(key, value));
25 )
26