@@ -12,12 +12,11 @@ * LICENSE.GPLv2 or LICENSE.GPLv3 respectively included in the packaging of this * file. */ #import "OFMutex.h" - -#import "condition.h" +#import "OFPlainCondition.h" OF_ASSUME_NONNULL_BEGIN @class OFDate; @@ -27,11 +26,11 @@ * @brief A class implementing a condition variable for thread synchronization. */ OF_SUBCLASSING_RESTRICTED @interface OFCondition: OFMutex { - of_condition_t _condition; + OFPlainCondition _condition; bool _conditionInitialized; } /** * @brief Creates a new condition. @@ -70,11 +69,11 @@ * to check the condition again after @ref waitForTimeInterval: returned! * * @param timeInterval The time interval until the timeout is reached * @return Whether the condition has been signaled */ -- (bool)waitForTimeInterval: (of_time_interval_t)timeInterval; +- (bool)waitForTimeInterval: (OFTimeInterval)timeInterval; #ifdef OF_AMIGAOS /** * @brief Blocks the current thread until another thread calls @ref signal, * @ref broadcast, the timeout is reached or an Exec Signal is received. @@ -84,11 +83,11 @@ * @param timeInterval The time interval until the timeout is reached * @param signalMask A pointer to a signal mask of Exec Signals to receive. * This is modified and set to the mask of signals received. * @return Whether the condition has been signaled or a signal received */ -- (bool)waitForTimeInterval: (of_time_interval_t)timeInterval +- (bool)waitForTimeInterval: (OFTimeInterval)timeInterval orExecSignal: (ULONG *)signalMask; #endif /** * @brief Blocks the current thread until another thread calls @ref signal, @@ -112,12 +111,11 @@ * @param date The date at which the timeout is reached * @param signalMask A pointer to a signal mask of Exec Signals to receive. * This is modified and set to the mask of signals received. * @return Whether the condition has been signaled or a signal received */ -- (bool)waitUntilDate: (OFDate *)date - orExecSignal: (ULONG *)signalMask; +- (bool)waitUntilDate: (OFDate *)date orExecSignal: (ULONG *)signalMask; #endif /** * @brief Signals the next waiting thread to continue. */