ObjFW  Diff

Differences From Artifact [35bdf0d696]:

To Artifact [fd76b79d25]:


26
27
28
29
30
31
32
33
34


35
36
37
38
39
40
41
26
27
28
29
30
31
32


33
34
35
36
37
38
39
40
41







-
-
+
+







#import "OFThread.h"
#import "OFList.h"
#import "OFDate.h"
#import "OFAutoreleasePool.h"

#import "OFConditionBroadcastFailedException.h"
#import "OFConditionSignalFailedException.h"
#import "OFConditionWaitFailedException.h"
#import "OFConditionWaitingException.h"
#import "OFConditionStillWaitingException.h"
#import "OFConditionWaitFailedException.h"
#import "OFInitializationFailedException.h"
#import "OFInvalidArgumentException.h"
#import "OFMutexLockFailedException.h"
#import "OFMutexStillLockedException.h"
#import "OFMutexUnlockFailedException.h"
#import "OFNotImplementedException.h"
#import "OFOutOfRangeException.h"
432
433
434
435
436
437
438
439


440
441
442
443
444
445


446
447
448
449
450
451


452
453
454
455
456
457

458


459
460
461
462
432
433
434
435
436
437
438

439
440
441
442
443
444
445

446
447
448
449
450
451
452

453
454
455
456
457
458
459
460
461

462
463
464
465
466
467







-
+
+





-
+
+





-
+
+






+
-
+
+





	return self;
}

- (void)wait
{
	if (!of_condition_wait(&condition, &mutex))
		@throw [OFConditionWaitFailedException newWithClass: isa];
		@throw [OFConditionWaitFailedException newWithClass: isa
							  condition: self];
}

- (void)signal
{
	if (!of_condition_signal(&condition))
		@throw [OFConditionSignalFailedException newWithClass: isa];
		@throw [OFConditionSignalFailedException newWithClass: isa
							    condition: self];
}

- (void)broadcast
{
	if (!of_condition_broadcast(&condition))
		@throw [OFConditionBroadcastFailedException newWithClass: isa];
		@throw [OFConditionBroadcastFailedException newWithClass: isa
							       condition: self];
}

- (void)dealloc
{
	if (cond_initialized)
		if (!of_condition_free(&condition))
			@throw [OFConditionStillWaitingException
			@throw [OFConditionWaitingException newWithClass: isa];
			    newWithClass: isa
			       condition: self];

	[super dealloc];
}
@end