ObjFW  Diff

Differences From Artifact [56ad3d2bba]:

To Artifact [926b087d59]:


51
52
53
54
55
56
57
58
59
60
61
62
63
64
65

static OFList *tlskeys;
static of_tlskey_t thread_self;

static id
call_main(id obj)
{
#ifndef OF_APPLE_RUNTIME
	objc_thread_add();
#endif

	if (!of_tlskey_set(thread_self, obj))
		@throw [OFInitializationFailedException
		    newWithClass: [obj class]];








|







51
52
53
54
55
56
57
58
59
60
61
62
63
64
65

static OFList *tlskeys;
static of_tlskey_t thread_self;

static id
call_main(id obj)
{
#if defined(OF_GNU_RUNTIME) || defined(OF_OLD_GNU_RUNTIME)
	objc_thread_add();
#endif

	if (!of_tlskey_set(thread_self, obj))
		@throw [OFInitializationFailedException
		    newWithClass: [obj class]];

74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
	((OFThread*)obj)->running = OF_THREAD_WAITING_FOR_JOIN;

	[OFTLSKey callAllDestructors];
	[OFAutoreleasePool releaseAll];

	[obj release];

#ifndef OF_APPLE_RUNTIME
	objc_thread_remove();
#endif

	return 0;
}

@implementation OFThread







|







74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
	((OFThread*)obj)->running = OF_THREAD_WAITING_FOR_JOIN;

	[OFTLSKey callAllDestructors];
	[OFAutoreleasePool releaseAll];

	[obj release];

#if defined(OF_GNU_RUNTIME) || defined(OF_OLD_GNU_RUNTIME)
	objc_thread_remove();
#endif

	return 0;
}

@implementation OFThread
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
	}

	[OFTLSKey callAllDestructors];
	[OFAutoreleasePool releaseAll];

	[thread release];

#ifndef OF_APPLE_RUNTIME
	objc_thread_remove();
#endif

	of_thread_exit();
}

- initWithObject: (id)obj







|







217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
	}

	[OFTLSKey callAllDestructors];
	[OFAutoreleasePool releaseAll];

	[thread release];

#if defined(OF_GNU_RUNTIME) || defined(OF_OLD_GNU_RUNTIME)
	objc_thread_remove();
#endif

	of_thread_exit();
}

- initWithObject: (id)obj