xref: /haiku/src/libs/posix_error_mapper/pthread_spinlock.cpp (revision b9d586e9d98da9083137dc5cafc5ec9b1980fb22)
1 /*
2  * Copyright 2010, 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_spin_init,
12 		(pthread_spinlock_t* lock, int pshared),
13 	return B_TO_POSITIVE_ERROR(sReal_pthread_spin_init(lock, pshared));
14 )
15 
16 
17 WRAPPER_FUNCTION(int, pthread_spin_destroy, (pthread_spinlock_t* lock),
18 	return B_TO_POSITIVE_ERROR(sReal_pthread_spin_destroy(lock));
19 )
20 
21 
22 WRAPPER_FUNCTION(int, pthread_spin_lock, (pthread_spinlock_t* lock),
23 	return B_TO_POSITIVE_ERROR(sReal_pthread_spin_lock(lock));
24 )
25 
26 
27 WRAPPER_FUNCTION(int, pthread_spin_trylock, (pthread_spinlock_t* lock),
28 	return B_TO_POSITIVE_ERROR(sReal_pthread_spin_trylock(lock));
29 )
30 
31 
32 WRAPPER_FUNCTION(int, pthread_spin_unlock, (pthread_spinlock_t* lock),
33 	return B_TO_POSITIVE_ERROR(sReal_pthread_spin_unlock(lock));
34 )
35