mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-21 20:51:52 +00:00
Tweaks to avoid compiler warnings with gcc-4
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@21390 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
a7f1ff64f9
commit
71e5005964
53 changed files with 502 additions and 322 deletions
|
@ -53,13 +53,55 @@
|
|||
#include "Foundation/NSConnection.h"
|
||||
#include "Foundation/NSInvocation.h"
|
||||
|
||||
@class GSPerformHolder;
|
||||
|
||||
typedef struct { @defs(NSThread) } NSThread_ivars;
|
||||
|
||||
static Class threadClass = Nil;
|
||||
static NSNotificationCenter *nc = nil;
|
||||
|
||||
/**
|
||||
* This class performs a dual function ...
|
||||
* <p>
|
||||
* As a class, it is responsible for handling incoming events from
|
||||
* the main runloop on a special inputFd. This consumes any bytes
|
||||
* written to wake the main runloop.<br />
|
||||
* During initialisation, the default runloop is set up to watch
|
||||
* for data arriving on inputFd.
|
||||
* </p>
|
||||
* <p>
|
||||
* As instances, each instance retains perform receiver and argument
|
||||
* values as long as they are needed, and handles locking to support
|
||||
* mthods which want to block until an action has been performed.
|
||||
* </p>
|
||||
* <p>
|
||||
* The initialize method of this class is called before any new threads
|
||||
* run.
|
||||
* </p>
|
||||
*/
|
||||
@interface GSPerformHolder : NSObject
|
||||
{
|
||||
id receiver;
|
||||
id argument;
|
||||
SEL selector;
|
||||
NSArray *modes;
|
||||
NSConditionLock *lock; // Not retained.
|
||||
}
|
||||
+ (BOOL) isValid;
|
||||
+ (GSPerformHolder*) newForReceiver: (id)r
|
||||
argument: (id)a
|
||||
selector: (SEL)s
|
||||
modes: (NSArray*)m
|
||||
lock: (NSConditionLock*)l;
|
||||
+ (void) receivedEvent: (void*)data
|
||||
type: (RunLoopEventType)type
|
||||
extra: (void*)extra
|
||||
forMode: (NSString*)mode;
|
||||
+ (NSDate*) timedOutEvent: (void*)data
|
||||
type: (RunLoopEventType)type
|
||||
forMode: (NSString*)mode;
|
||||
- (void) fire;
|
||||
@end
|
||||
|
||||
/**
|
||||
* Sleep until the current date/time is the specified time interval
|
||||
* past the reference date/time.<br />
|
||||
|
@ -748,49 +790,6 @@ gnustep_base_thread_callback(void)
|
|||
|
||||
|
||||
|
||||
/**
|
||||
* This class performs a dual function ...
|
||||
* <p>
|
||||
* As a class, it is responsible for handling incoming events from
|
||||
* the main runloop on a special inputFd. This consumes any bytes
|
||||
* written to wake the main runloop.<br />
|
||||
* During initialisation, the default runloop is set up to watch
|
||||
* for data arriving on inputFd.
|
||||
* </p>
|
||||
* <p>
|
||||
* As instances, each instance retains perform receiver and argument
|
||||
* values as long as they are needed, and handles locking to support
|
||||
* mthods which want to block until an action has been performed.
|
||||
* </p>
|
||||
* <p>
|
||||
* The initialize method of this class is called before any new threads
|
||||
* run.
|
||||
* </p>
|
||||
*/
|
||||
@interface GSPerformHolder : NSObject
|
||||
{
|
||||
id receiver;
|
||||
id argument;
|
||||
SEL selector;
|
||||
NSArray *modes;
|
||||
NSConditionLock *lock; // Not retained.
|
||||
}
|
||||
+ (BOOL) isValid;
|
||||
+ (GSPerformHolder*) newForReceiver: (id)r
|
||||
argument: (id)a
|
||||
selector: (SEL)s
|
||||
modes: (NSArray*)m
|
||||
lock: (NSConditionLock*)l;
|
||||
+ (void) receivedEvent: (void*)data
|
||||
type: (RunLoopEventType)type
|
||||
extra: (void*)extra
|
||||
forMode: (NSString*)mode;
|
||||
+ (NSDate*) timedOutEvent: (void*)data
|
||||
type: (RunLoopEventType)type
|
||||
forMode: (NSString*)mode;
|
||||
- (void) fire;
|
||||
@end
|
||||
|
||||
@implementation GSPerformHolder
|
||||
|
||||
static NSLock *subthreadsLock = nil;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue