mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-30 16:30:41 +00:00
Tidy up use of white space so we have it after if/for/while and not after (
or before ) or padding at end of line. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@20773 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
c5f49ccbcb
commit
0708409c1b
180 changed files with 2181 additions and 2156 deletions
|
@ -4,15 +4,15 @@
|
|||
Author: Scott Christley <scottc@net-community.com>
|
||||
Created: 1996
|
||||
Author: Richard Frith-Macdonald <rfm@gnu.org>
|
||||
|
||||
|
||||
This file is part of the GNUstep Objective-C Library.
|
||||
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Library General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2 of the License, or (at your option) any later version.
|
||||
|
||||
This library is distributed in the hope that it will be useful,
|
||||
|
||||
This library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Library General Public License for more details.
|
||||
|
@ -23,7 +23,7 @@
|
|||
|
||||
<title>NSLock class reference</title>
|
||||
$Date$ $Revision$
|
||||
*/
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
#include <errno.h>
|
||||
|
@ -430,7 +430,7 @@ NSString *NSRecursiveLockException = @"NSRecursiveLockException";
|
|||
|
||||
// Acquiring the lock with a date condition
|
||||
- (BOOL) lockBeforeDate: (NSDate*)limit
|
||||
{
|
||||
{
|
||||
GSSleepInfo ctxt;
|
||||
|
||||
CHECK_RECURSIVE_CONDITION_LOCK(_MUTEX);
|
||||
|
@ -480,7 +480,7 @@ NSString *NSRecursiveLockException = @"NSRecursiveLockException";
|
|||
GSNameFromSelector(_cmd)];
|
||||
/* NOT REACHED */
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
while (GSSleepOrFail(&ctxt) == YES);
|
||||
|
||||
|
@ -489,34 +489,34 @@ NSString *NSRecursiveLockException = @"NSRecursiveLockException";
|
|||
#else
|
||||
NSTimeInterval atimeinterval;
|
||||
struct timespec endtime;
|
||||
|
||||
|
||||
CHECK_RECURSIVE_CONDITION_LOCK(_MUTEX);
|
||||
|
||||
|
||||
if (-1 == objc_mutex_lock(_MUTEX))
|
||||
[NSException raise: NSConditionLockException
|
||||
[NSException raise: NSConditionLockException
|
||||
format: @"lockWhenCondition: failed to lock mutex"];
|
||||
|
||||
if (_condition_value == condition_to_meet)
|
||||
return YES;
|
||||
|
||||
|
||||
atimeinterval = [limitDate timeIntervalSince1970];
|
||||
endtime.tv_sec =(unsigned int)atimeinterval; // 941883028;//
|
||||
endtime.tv_nsec = (unsigned int)((atimeinterval - (float)endtime.tv_sec)
|
||||
* 1000000000.0);
|
||||
|
||||
|
||||
while (_condition_value != condition_to_meet)
|
||||
{
|
||||
switch (objc_condition_timedwait(_CONDITION, _MUTEX, &endtime))
|
||||
{
|
||||
case 0:
|
||||
case 0:
|
||||
break;
|
||||
case EINTR:
|
||||
case EINTR:
|
||||
break;
|
||||
case ETIMEDOUT :
|
||||
case ETIMEDOUT :
|
||||
[self unlock];
|
||||
return NO;
|
||||
default:
|
||||
[NSException raise: NSConditionLockException
|
||||
default:
|
||||
[NSException raise: NSConditionLockException
|
||||
format: @"objc_condition_timedwait failed"];
|
||||
[self unlock];
|
||||
return NO;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue