[Gc] NetBSD pthreads support
bizenn at visha.org
Wed Sep 28 21:02:57 PDT 2005
On 2005/09/29, at 4:45, Boehm, Hans wrote:
> I think I'm fine with all of the changes, except probably the
> introduction of GC_restart_ack_sem. This looks like it's trying to
> a possibly generic race condition, perhaps the one pointed out in the
> thread "race condition when restarting threads", started by Ben Maurer
> on July 3?
Maybe, no. On NetBSD 2.x or 3.x, SIG_SUSPEND is sent but sometime
suspend_handler() is not called, so sem_wait() in GC_stop_world()
waits for sem_post() in suspend_handler() eternally.
> Are you sure this is still necessary in 6.6?
Yes. It's necessary in 6.6 too.
> If so, is there any reason
> to believe this is NetBSD-specific?
Maybe, no. There is no reason for NetBSD-specific. Because,
if GC_stop_world() should work synchronously(sem_wait()/sem_post() are
used for this reason, aren't they?),
I think GC_restart_world() should be same way too.
But this code has some overhead. So if such deadlock is never
happend on other platforms, it should be NetBSD-specific.
Sorry but I didn't test on any other pthreaded platforms.
More information about the Gc