mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-30 08:21:25 +00:00
merge back reorganisation branch
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@29615 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
d0b66e510d
commit
f13d56d8ec
263 changed files with 5577 additions and 4170 deletions
|
@ -32,6 +32,7 @@
|
|||
*/
|
||||
|
||||
#include "config.h"
|
||||
#define EXPOSE_NSThread_IVARS 1
|
||||
#include "GNUstepBase/preface.h"
|
||||
#ifdef HAVE_UNISTD_H
|
||||
#include <unistd.h>
|
||||
|
@ -96,8 +97,6 @@ extern NSTimeInterval GSTimeNow(void);
|
|||
+ (void) _endThread: (NSThread*)thread;
|
||||
@end
|
||||
|
||||
typedef struct { @defs(NSThread) } NSThread_ivars;
|
||||
|
||||
static Class threadClass = Nil;
|
||||
static NSNotificationCenter *nc = nil;
|
||||
|
||||
|
@ -1048,16 +1047,16 @@ GSRunLoopInfoForThread(NSThread *aThread)
|
|||
{
|
||||
aThread = GSCurrentThread();
|
||||
}
|
||||
if (((NSThread_ivars*)aThread)->_runLoopInfo == nil)
|
||||
if (aThread->_runLoopInfo == nil)
|
||||
{
|
||||
[gnustep_global_lock lock];
|
||||
if (((NSThread_ivars*)aThread)->_runLoopInfo == nil)
|
||||
if (aThread->_runLoopInfo == nil)
|
||||
{
|
||||
((NSThread_ivars*)aThread)->_runLoopInfo = [GSRunLoopThreadInfo new];
|
||||
aThread->_runLoopInfo = [GSRunLoopThreadInfo new];
|
||||
}
|
||||
[gnustep_global_lock unlock];
|
||||
}
|
||||
info = ((NSThread_ivars*)aThread)->_runLoopInfo;
|
||||
info = aThread->_runLoopInfo;
|
||||
return info;
|
||||
}
|
||||
|
||||
|
@ -1312,12 +1311,12 @@ GSUnregisterCurrentThread (void)
|
|||
|
||||
thread = GSCurrentThread();
|
||||
|
||||
if (((NSThread_ivars *)thread)->_active == YES)
|
||||
if (thread->_active == YES)
|
||||
{
|
||||
/*
|
||||
* Set the thread to be inactive to avoid any possibility of recursion.
|
||||
*/
|
||||
((NSThread_ivars *)thread)->_active = NO;
|
||||
thread->_active = NO;
|
||||
|
||||
/*
|
||||
* Let observers know this thread is exiting.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue