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:
parent
ef1716f81b
commit
b9d586e9d9
@ -11,6 +11,7 @@ StaticLibrary libposix_error_mapper.a :
|
||||
pthread_rwlockattr.cpp
|
||||
pthread_rwlock.cpp
|
||||
pthread_specific.cpp
|
||||
pthread_spinlock.cpp
|
||||
pthread_thread.cpp
|
||||
signal.cpp
|
||||
;
|
||||
|
34
src/libs/posix_error_mapper/pthread_spinlock.cpp
Normal file
34
src/libs/posix_error_mapper/pthread_spinlock.cpp
Normal file
@ -0,0 +1,34 @@
|
||||
/*
|
||||
* Copyright 2010, Ingo Weinhold, ingo_weinhold@gmx.de.
|
||||
* 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));
|
||||
)
|
Loading…
x
Reference in New Issue
Block a user