|
From: | Richard Frith-Macdonald |
Subject: | Re: gnustep base on NetBSD 4.0 i386 |
Date: | Sun, 6 Jan 2008 14:02:20 +0000 |
On 6 Jan 2008, at 10:41, David Wetzel wrote:
Richard Frith-Macdonald wrote:That's an odd error message... I changed the code to clear errno immediately before detaching the thread, so as to be sure we don't have a value hanging round form an earlier call.(gdb) rStarting program: /Users/dave/projects/gnustep-testfarm/core/base/ Testing/obj/diningPhilosophers /Users/dave/projects/gnustep-testfarm/core/base/Testing/obj/ diningPhilosophers: Uncaught exception NSInternalInconsistencyException, reason: Unable to detach thread (last error Undefinederror: 0)
OK ... so errno 0 means that the operating system is not reporting any error ... supporting the idea that the thread detach is succeeding.
Possibly what you are seeing is an objc runtime bug such that the detach succeeds but appears to fail because the thread ID is zero? See http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18573No idea. Do you have a test program for that?
Nope ... I guess you would need to build the runtime with debug, so you could step through into the runtime method to detach the thread, and see what thread Id the underlying call is returning, and what error status it is returning.
Anyway, it looks like you probably have a gcc/runtime problem rather than an gnustep problem. You could try to confirm that by writing a little test program to detach a thread using the objc api directly and not linking with any gnustep stuff.
eg. something like #include <objc/thr.h> #include <objc/Object.h> int main() { id o = [Object new];return objc_thread_detach (@selector(hash), o, nil); /* Return 0 on failure */
}
[Prev in Thread] | Current Thread | [Next in Thread] |