mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-12 00:51:08 +00:00
Fixup bad indentation
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@29473 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
d85c001251
commit
7f2d7d10eb
1 changed files with 23 additions and 19 deletions
|
@ -43,7 +43,7 @@
|
||||||
* acquired. This is compatible with earlier GNUstep behaviour. In OS X 10.5
|
* acquired. This is compatible with earlier GNUstep behaviour. In OS X 10.5
|
||||||
* and later, these will just NSLog a warning instead. Throwing an exception
|
* and later, these will just NSLog a warning instead. Throwing an exception
|
||||||
* is probably better behaviour, because it encourages developer to fix their
|
* is probably better behaviour, because it encourages developer to fix their
|
||||||
* code.
|
* code.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#define MDEALLOC \
|
#define MDEALLOC \
|
||||||
|
@ -307,19 +307,19 @@ MUNLOCK
|
||||||
timeout.tv_sec = secs;
|
timeout.tv_sec = secs;
|
||||||
// Convert fractions of a second to nanoseconds
|
// Convert fractions of a second to nanoseconds
|
||||||
timeout.tv_nsec = subsecs * 1e9;
|
timeout.tv_nsec = subsecs * 1e9;
|
||||||
|
|
||||||
retVal = pthread_cond_timedwait(&_condition, &_mutex, &timeout);
|
retVal = pthread_cond_timedwait(&_condition, &_mutex, &timeout);
|
||||||
|
|
||||||
if (retVal == 0)
|
if (retVal == 0)
|
||||||
{
|
{
|
||||||
return YES;
|
return YES;
|
||||||
}
|
}
|
||||||
else if (retVal == EINVAL)
|
else if (retVal == EINVAL)
|
||||||
{
|
{
|
||||||
NSLog(@"Invalid arguments to pthread_cond_timedwait");
|
NSLog(@"Invalid arguments to pthread_cond_timedwait");
|
||||||
}
|
}
|
||||||
|
|
||||||
return NO;
|
return NO;
|
||||||
}
|
}
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
@ -390,11 +390,13 @@ MUNLOCK
|
||||||
{
|
{
|
||||||
return YES;
|
return YES;
|
||||||
}
|
}
|
||||||
while ([_condition waitUntilDate: limitDate]) {
|
while ([_condition waitUntilDate: limitDate])
|
||||||
if (condition_to_meet == _condition_value) {
|
{
|
||||||
return YES; // KEEP THE LOCK
|
if (condition_to_meet == _condition_value)
|
||||||
|
{
|
||||||
|
return YES; // KEEP THE LOCK
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
// we timed out and no longer have the lock
|
// we timed out and no longer have the lock
|
||||||
return NO;
|
return NO;
|
||||||
|
@ -409,16 +411,18 @@ MNAME
|
||||||
|
|
||||||
- (BOOL) tryLockWhenCondition: (NSInteger)condition_to_meet
|
- (BOOL) tryLockWhenCondition: (NSInteger)condition_to_meet
|
||||||
{
|
{
|
||||||
if ([_condition tryLock]) {
|
if ([_condition tryLock])
|
||||||
if (condition_to_meet == _condition_value) {
|
{
|
||||||
return YES; // KEEP THE LOCK
|
if (condition_to_meet == _condition_value)
|
||||||
}
|
{
|
||||||
else {
|
return YES; // KEEP THE LOCK
|
||||||
[_condition unlock];
|
|
||||||
}
|
}
|
||||||
}
|
else
|
||||||
|
{
|
||||||
return NO;
|
[_condition unlock];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return NO;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void) unlock
|
- (void) unlock
|
||||||
|
|
Loading…
Reference in a new issue