/* NSLock.h Copyright (c) 1994-2012, Apple Inc. All rights reserved. */ #import @class NSDate; @protocol NSLocking - (void)lock; - (void)unlock; @end @interface NSLock : NSObject { @private void *_priv; } - (BOOL)tryLock; - (BOOL)lockBeforeDate:(NSDate *)limit; - (void)setName:(NSString *)n NS_AVAILABLE(10_5, 2_0); - (NSString *)name NS_AVAILABLE(10_5, 2_0); @end @interface NSConditionLock : NSObject { @private void *_priv; } - (id)initWithCondition:(NSInteger)condition; - (NSInteger)condition; - (void)lockWhenCondition:(NSInteger)condition; - (BOOL)tryLock; - (BOOL)tryLockWhenCondition:(NSInteger)condition; - (void)unlockWithCondition:(NSInteger)condition; - (BOOL)lockBeforeDate:(NSDate *)limit; - (BOOL)lockWhenCondition:(NSInteger)condition beforeDate:(NSDate *)limit; - (void)setName:(NSString *)n NS_AVAILABLE(10_5, 2_0); - (NSString *)name NS_AVAILABLE(10_5, 2_0); @end @interface NSRecursiveLock : NSObject { @private void *_priv; } - (BOOL)tryLock; - (BOOL)lockBeforeDate:(NSDate *)limit; - (void)setName:(NSString *)n NS_AVAILABLE(10_5, 2_0); - (NSString *)name NS_AVAILABLE(10_5, 2_0); @end NS_CLASS_AVAILABLE(10_5, 2_0) @interface NSCondition : NSObject { @private void *_priv; } - (void)wait; - (BOOL)waitUntilDate:(NSDate *)limit; - (void)signal; - (void)broadcast; - (void)setName:(NSString *)n; - (NSString *)name; @end