ObjFW  Check-in [6ebbffda0d]

Overview
Comment:Don't call objc_thread_[add,remove} when using ObjFW-RT.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 6ebbffda0df10200610a2f2b30af84f545ecd7598ad45756c4a0ae87b4a175f1
User & Date: js on 2011-04-21 11:17:59
Other Links: manifest | tags
Context
2011-04-21
11:21
Update ChangeLog. check-in: 0cde0d8fbc user: js tags: trunk
11:17
Don't call objc_thread_[add,remove} when using ObjFW-RT. check-in: 6ebbffda0d user: js tags: trunk
2011-04-12
14:51
Use void in declarations when we take no parameters. check-in: c02e48e140 user: js tags: trunk
Changes

Modified src/OFThread.m from [56ad3d2bba] to [926b087d59].

51
52
53
54
55
56
57
58

59
60
61
62
63
64
65
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
#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
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
#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
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
#if defined(OF_GNU_RUNTIME) || defined(OF_OLD_GNU_RUNTIME)
	objc_thread_remove();
#endif

	of_thread_exit();
}

- initWithObject: (id)obj