Differences From Artifact [67db96fe50]:
- File src/OFThread.m — part of check-in [50a6ffd4b1] at 2019-04-21 09:58:27 on branch trunk — Fix compilation on AmigaOS 4 with 53.30 SDK (user: js, size: 10569) [annotate] [blame] [check-ins using]
To Artifact [0906d8e684]:
- File
src/OFThread.m
— part of check-in
[b5430ac44f]
at
2019-07-28 12:32:21
on branch trunk
— OFThread: Don't require of_thread_exit()
Some systems do not provide the functionality. (user: js, size: 10472) [annotate] [blame] [check-ins using]
︙ | ︙ | |||
131 132 133 134 135 136 137 | of_thread_set_name( [name cStringWithEncoding: [OFLocale encoding]]); else of_thread_set_name(object_getClassName(thread)); /* * Nasty workaround for thread implementations which can't return a | | > | | | | > | 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 | of_thread_set_name( [name cStringWithEncoding: [OFLocale encoding]]); else of_thread_set_name(object_getClassName(thread)); /* * Nasty workaround for thread implementations which can't return a * pointer on join, or don't have a way to exit a thread. */ if (setjmp(thread->_exitEnv) == 0) { # ifdef OF_HAVE_BLOCKS if (thread->_threadBlock != NULL) thread->_returnValue = [thread->_threadBlock() retain]; else # endif thread->_returnValue = [[thread main] retain]; } [thread handleTermination]; thread->_running = OF_THREAD_WAITING_FOR_JOIN; objc_autoreleasePoolPop(thread->_pool); [OFAutoreleasePool of_handleThreadTermination]; |
︙ | ︙ | |||
323 324 325 326 327 328 329 | OF_UNREACHABLE } + (void)terminateWithObject: (id)object { OFThread *thread = of_tlskey_get(threadSelfKey); | | < < | < < < | < < < < < | 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 | OF_UNREACHABLE } + (void)terminateWithObject: (id)object { OFThread *thread = of_tlskey_get(threadSelfKey); OF_ENSURE(thread != nil); thread->_returnValue = [object retain]; longjmp(thread->_exitEnv, 1); } + (void)setName: (OFString *)name { [OFThread currentThread].name = name; if (name != nil) |
︙ | ︙ |