Added wrappers for the spinlock functions.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36334 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -11,6 +11,7 @@ StaticLibrary libposix_error_mapper.a :
|
|||||||
pthread_rwlockattr.cpp
|
pthread_rwlockattr.cpp
|
||||||
pthread_rwlock.cpp
|
pthread_rwlock.cpp
|
||||||
pthread_specific.cpp
|
pthread_specific.cpp
|
||||||
|
pthread_spinlock.cpp
|
||||||
pthread_thread.cpp
|
pthread_thread.cpp
|
||||||
signal.cpp
|
signal.cpp
|
||||||
;
|
;
|
||||||
|
|||||||
@@ -0,0 +1,34 @@
|
|||||||
|
/*
|
||||||
|
* Copyright 2010, Ingo Weinhold, [email protected].
|
||||||
|
* Distributed under the terms of the MIT License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <pthread.h>
|
||||||
|
|
||||||
|
#include "posix_error_mapper.h"
|
||||||
|
|
||||||
|
|
||||||
|
WRAPPER_FUNCTION(int, pthread_spin_init,
|
||||||
|
(pthread_spinlock_t* lock, int pshared),
|
||||||
|
return B_TO_POSITIVE_ERROR(sReal_pthread_spin_init(lock, pshared));
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
WRAPPER_FUNCTION(int, pthread_spin_destroy, (pthread_spinlock_t* lock),
|
||||||
|
return B_TO_POSITIVE_ERROR(sReal_pthread_spin_destroy(lock));
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
WRAPPER_FUNCTION(int, pthread_spin_lock, (pthread_spinlock_t* lock),
|
||||||
|
return B_TO_POSITIVE_ERROR(sReal_pthread_spin_lock(lock));
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
WRAPPER_FUNCTION(int, pthread_spin_trylock, (pthread_spinlock_t* lock),
|
||||||
|
return B_TO_POSITIVE_ERROR(sReal_pthread_spin_trylock(lock));
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
WRAPPER_FUNCTION(int, pthread_spin_unlock, (pthread_spinlock_t* lock),
|
||||||
|
return B_TO_POSITIVE_ERROR(sReal_pthread_spin_unlock(lock));
|
||||||
|
)
|
||||||
Reference in New Issue
Block a user