@@ -15,77 +15,77 @@ #include "config.h" #include -#import "mutex.h" +#import "OFPlainMutex.h" #include int -of_mutex_new(of_mutex_t *mutex) +OFPlainMutexNew(OFPlainMutex *mutex) { InitSemaphore(mutex); return 0; } int -of_mutex_lock(of_mutex_t *mutex) +OFPlainMutexLock(OFPlainMutex *mutex) { ObtainSemaphore(mutex); return 0; } int -of_mutex_trylock(of_mutex_t *mutex) +OFPlainMutexTryLock(OFPlainMutex *mutex) { if (!AttemptSemaphore(mutex)) return EBUSY; return 0; } int -of_mutex_unlock(of_mutex_t *mutex) +OFPlainMutexUnlock(OFPlainMutex *mutex) { ReleaseSemaphore(mutex); return 0; } int -of_mutex_free(of_mutex_t *mutex) +OFPlainMutexFree(OFPlainMutex *mutex) { return 0; } int -of_rmutex_new(of_rmutex_t *rmutex) -{ - return of_mutex_new(rmutex); -} - -int -of_rmutex_lock(of_rmutex_t *rmutex) -{ - return of_mutex_lock(rmutex); -} - -int -of_rmutex_trylock(of_rmutex_t *rmutex) -{ - return of_mutex_trylock(rmutex); -} - -int -of_rmutex_unlock(of_rmutex_t *rmutex) -{ - return of_mutex_unlock(rmutex); -} - -int -of_rmutex_free(of_rmutex_t *rmutex) -{ - return of_mutex_free(rmutex); +OFPlainRecursiveMutexNew(OFPlainRecursiveMutex *rmutex) +{ + return OFPlainMutexNew(rmutex); +} + +int +OFPlainRecursiveMutexLock(OFPlainRecursiveMutex *rmutex) +{ + return OFPlainMutexLock(rmutex); +} + +int +OFPlainRecursiveMutexTryLock(OFPlainRecursiveMutex *rmutex) +{ + return OFPlainMutexTryLock(rmutex); +} + +int +OFPlainRecursiveMutexUnlock(OFPlainRecursiveMutex *rmutex) +{ + return OFPlainMutexUnlock(rmutex); +} + +int +OFPlainRecursiveMutexFree(OFPlainRecursiveMutex *rmutex) +{ + return OFPlainMutexFree(rmutex); }