[Issue 13416] dead-lock in FreeBSD suspend handler

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Fri Oct 30 20:58:20 PDT 2015


https://issues.dlang.org/show_bug.cgi?id=13416

--- Comment #10 from Martin Nowak <code at dawg.eu> ---
(In reply to Joakim from comment #9)
> This fix doesn't seem to work on 9.1 i386, as the new FreeBSD test
> introduced in this PR hangs 90+% of the time.

> I also tried to override SIGCANCEL
> which is used for pthread_suspend_np but that didn't work.

SIGCANCEL is the signal used by pthread_suspend_np internally.
The signal handler already deal with being in critical regions, hence it
doesn't suffer from the deadlock. As it isn't allowed to overrride SIGCANCEL we
imitated the behavior by poking in pthread guts (THR_IN_CRITICAL).

--


More information about the Digitalmars-d-bugs mailing list