@@ -13,17 +13,18 @@ * LICENSE.GPLv2 or LICENSE.GPLv3 respectively included in the packaging of this * file. */ #import "OFObject.h" +#import "OFLocking.h" #import "threading.h" /** * \brief A class for creating mutual exclusions. */ -@interface OFMutex: OFObject +@interface OFMutex: OFObject { of_mutex_t mutex; BOOL initialized; } @@ -31,25 +32,6 @@ * \brief Creates a new mutex. * * \return A new autoreleased mutex. */ + (instancetype)mutex; - -- OF_initWithoutCreatingMutex; - -/** - * \brief Locks the mutex. - */ -- (void)lock; - -/** - * \brief Tries to lock the mutex. - * - * \return A boolean whether the mutex could be acquired - */ -- (BOOL)tryLock; - -/** - * \brief Unlocks the mutex. - */ -- (void)unlock; @end