Skip to content
This repository has been archived by the owner on Oct 12, 2022. It is now read-only.

Commit

Permalink
add some explanatory comments
Browse files Browse the repository at this point in the history
  • Loading branch information
MartinNowak committed Dec 12, 2014
1 parent e75225d commit f4b55e9
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/core/thread.d
Original file line number Diff line number Diff line change
Expand Up @@ -455,10 +455,13 @@ else version( Posix )

}

// HACK to avoid deadlocks on FreeBSD, see Issue 13416
// HACK libthr internal (thr_private.h) macro, used to
// avoid deadlocks in signal handler, see Issue 13416
version (FreeBSD) bool THR_IN_CRITICAL(pthread_t p) nothrow @nogc
{
import core.sys.posix.sys.types : c_long, lwpid_t;
// If the begin of pthread would be changed in libthr (unlikely)
// we'll run into undefined behavior, compare with thr_private.h.
static struct pthread
{
c_long tid;
Expand Down

0 comments on commit f4b55e9

Please sign in to comment.