mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-30 16:30:41 +00:00
More changes to make lock tracking more robust
This commit is contained in:
parent
603c3b1103
commit
cc7a146796
6 changed files with 107 additions and 57 deletions
|
@ -325,6 +325,33 @@ typedef void NSLock_error_handler(id obj, SEL _cmd, BOOL stop, NSString *msg);
|
|||
* logging of a deadlock.
|
||||
*/
|
||||
GS_EXPORT NSLock_error_handler *_NSLock_error_handler;
|
||||
|
||||
/** Controls tracing of locks for deadlocking.
|
||||
*/
|
||||
@interface NSObject (GSTraceLocks)
|
||||
/** Sets whether newly created lock objects (NSCondition, NSConditionLock,
|
||||
* NSLock, NSRecursiveLock but NOT NSDistributedLock) should be created so
|
||||
* that their use by threads is traced and deadlocks can be detected.<br />
|
||||
* Returns the old value of the setting.
|
||||
*/
|
||||
+ (BOOL) shouldCreateTraceableLocks: (BOOL)shouldTrace;
|
||||
|
||||
/** Creates and returns a single autoreleased traced condition.
|
||||
*/
|
||||
+ (NSCondition*) tracedCondition;
|
||||
|
||||
/** Creates and returns a single autoreleased traced condition lock.
|
||||
*/
|
||||
+ (NSConditionLock*) tracedConditionLockWithCondition: (NSInteger)value;
|
||||
|
||||
/** Creates and returns a single autoreleased traced lock.
|
||||
*/
|
||||
+ (NSLock*) tracedLock;
|
||||
|
||||
/** Creates and returns a single autoreleased traced recursive lock.
|
||||
*/
|
||||
+ (NSRecursiveLock*) tracedRecursiveLock;
|
||||
@end
|
||||
#endif
|
||||
|
||||
#if defined(__cplusplus)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue