@@ -35,11 +35,11 @@ - (instancetype)init { self = [super init]; - if (of_rmutex_new(&_rmutex) != 0) { + if (OFPlainRecursiveMutexNew(&_rmutex) != 0) { Class c = self.class; [self release]; @throw [OFInitializationFailedException exceptionWithClass: c]; } @@ -49,14 +49,14 @@ } - (void)dealloc { if (_initialized) { - int error = of_rmutex_free(&_rmutex); + int error = OFPlainRecursiveMutexFree(&_rmutex); if (error != 0) { - OF_ENSURE(error == EBUSY); + OFEnsure(error == EBUSY); @throw [OFStillLockedException exceptionWithLock: self]; } } @@ -65,20 +65,20 @@ [super dealloc]; } - (void)lock { - int error = of_rmutex_lock(&_rmutex); + int error = OFPlainRecursiveMutexLock(&_rmutex); if (error != 0) @throw [OFLockFailedException exceptionWithLock: self errNo: error]; } - (bool)tryLock { - int error = of_rmutex_trylock(&_rmutex); + int error = OFPlainRecursiveMutexTryLock(&_rmutex); if (error != 0) { if (error == EBUSY) return false; else @@ -89,11 +89,11 @@ return true; } - (void)unlock { - int error = of_rmutex_unlock(&_rmutex); + int error = OFPlainRecursiveMutexUnlock(&_rmutex); if (error != 0) @throw [OFUnlockFailedException exceptionWithLock: self errNo: error]; }