Author: rfm
Date: Mon Jul 18 12:50:28 2016
New Revision: 40008
URL: http://svn.gna.org/viewcvs/gnustep?rev=40008&view=rev
Log:
patch by Larry Campbell plus removal of some garbage collection vestiges
Modified:
libs/base/trunk/ChangeLog
libs/base/trunk/Source/NSAutoreleasePool.m
libs/base/trunk/Source/NSConcreteHashTable.m
libs/base/trunk/Source/NSConcreteMapTable.m
libs/base/trunk/Source/NSGarbageCollector.m
libs/base/trunk/Source/NSThread.m
Modified: libs/base/trunk/ChangeLog
URL:
http://svn.gna.org/viewcvs/gnustep/libs/base/trunk/ChangeLog?rev=40008&r1=40007&r2=40008&view=diff
==============================================================================
--- libs/base/trunk/ChangeLog (original)
+++ libs/base/trunk/ChangeLog Mon Jul 18 12:50:28 2016
@@ -1,3 +1,8 @@
+2016-07-18 Larry Campbell <[email protected]>
+
+ * Source/NSThread.m: Send notification about becoming multithreaded
+ when the new thread is registered from outside our API.
+
2016-07-18 Richard Frith-Macdonald <[email protected]>
* Source/NSOperation.m: avoid sorting the queue ... keep the array of
Modified: libs/base/trunk/Source/NSAutoreleasePool.m
URL:
http://svn.gna.org/viewcvs/gnustep/libs/base/trunk/Source/NSAutoreleasePool.m?rev=40008&r1=40007&r2=40008&view=diff
==============================================================================
--- libs/base/trunk/Source/NSAutoreleasePool.m (original)
+++ libs/base/trunk/Source/NSAutoreleasePool.m Mon Jul 18 12:50:28 2016
@@ -30,7 +30,6 @@
#define EXPOSE_NSAutoreleasePool_IVARS 1
#define EXPOSE_NSThread_IVARS 1
#import "Foundation/NSAutoreleasePool.h"
-#import "Foundation/NSGarbageCollector.h"
#import "Foundation/NSException.h"
#import "Foundation/NSThread.h"
Modified: libs/base/trunk/Source/NSConcreteHashTable.m
URL:
http://svn.gna.org/viewcvs/gnustep/libs/base/trunk/Source/NSConcreteHashTable.m?rev=40008&r1=40007&r2=40008&view=diff
==============================================================================
--- libs/base/trunk/Source/NSConcreteHashTable.m (original)
+++ libs/base/trunk/Source/NSConcreteHashTable.m Mon Jul 18 12:50:28 2016
@@ -33,7 +33,6 @@
#import "Foundation/NSDictionary.h"
#import "Foundation/NSEnumerator.h"
#import "Foundation/NSException.h"
-#import "Foundation/NSGarbageCollector.h"
#import "Foundation/NSHashTable.h"
#import "NSConcretePointerFunctions.h"
Modified: libs/base/trunk/Source/NSConcreteMapTable.m
URL:
http://svn.gna.org/viewcvs/gnustep/libs/base/trunk/Source/NSConcreteMapTable.m?rev=40008&r1=40007&r2=40008&view=diff
==============================================================================
--- libs/base/trunk/Source/NSConcreteMapTable.m (original)
+++ libs/base/trunk/Source/NSConcreteMapTable.m Mon Jul 18 12:50:28 2016
@@ -33,7 +33,6 @@
#import "Foundation/NSDictionary.h"
#import "Foundation/NSEnumerator.h"
#import "Foundation/NSException.h"
-#import "Foundation/NSGarbageCollector.h"
#import "Foundation/NSMapTable.h"
#import "NSConcretePointerFunctions.h"
Modified: libs/base/trunk/Source/NSGarbageCollector.m
URL:
http://svn.gna.org/viewcvs/gnustep/libs/base/trunk/Source/NSGarbageCollector.m?rev=40008&r1=40007&r2=40008&view=diff
==============================================================================
--- libs/base/trunk/Source/NSGarbageCollector.m (original)
+++ libs/base/trunk/Source/NSGarbageCollector.m Mon Jul 18 12:50:28 2016
@@ -26,14 +26,11 @@
#import "common.h"
#import "Foundation/NSGarbageCollector.h"
-static NSGarbageCollector *collector = nil;
-static unsigned disabled = 0;
-
@implementation NSGarbageCollector
+ (id) defaultCollector
{
- return collector;
+ return nil;
}
- (void) collectIfNeeded
@@ -68,12 +65,8 @@
- (id) init
{
- if (self != collector)
- {
- [self dealloc];
- self = nil;
- }
- return self;
+ [self dealloc];
+ return nil;
}
- (BOOL) isCollecting
@@ -83,11 +76,7 @@
- (BOOL) isEnabled
{
- if (disabled)
- {
- return NO;
- }
- return YES;
+ return NO;
}
- (NSZone*) zone
Modified: libs/base/trunk/Source/NSThread.m
URL:
http://svn.gna.org/viewcvs/gnustep/libs/base/trunk/Source/NSThread.m?rev=40008&r1=40007&r2=40008&view=diff
==============================================================================
--- libs/base/trunk/Source/NSThread.m (original)
+++ libs/base/trunk/Source/NSThread.m Mon Jul 18 12:50:28 2016
@@ -73,7 +73,6 @@
#import "Foundation/NSConnection.h"
#import "Foundation/NSInvocation.h"
#import "Foundation/NSUserDefaults.h"
-#import "Foundation/NSGarbageCollector.h"
#import "Foundation/NSValue.h"
#import "GSPrivate.h"
@@ -734,7 +733,6 @@
static void
setThreadForCurrentThread(NSThread *t)
{
- [[NSGarbageCollector defaultCollector] disableCollectorForPointer: t];
pthread_setspecific(thread_object_key, t);
gnustep_base_thread_callback();
}
@@ -764,7 +762,6 @@
[(GSRunLoopThreadInfo*)thread->_runLoopInfo invalidate];
RELEASE(thread);
- [[NSGarbageCollector defaultCollector] enableCollectorForPointer:
thread];
pthread_setspecific(thread_object_key, nil);
}
}
@@ -784,9 +781,12 @@
{
t = [self new];
t->_active = YES;
- [[NSGarbageCollector defaultCollector] disableCollectorForPointer: t];
pthread_setspecific(thread_object_key, t);
GS_CONSUMED(t);
+ if (defaultThread != nil && t != defaultThread)
+ {
+ gnustep_base_thread_callback();
+ }
return YES;
}
return NO;
_______________________________________________
Gnustep-cvs mailing list
[email protected]
https://mail.gna.org/listinfo/gnustep-cvs