Subject: Re: bug#25265: make-thread crashes in OS X 10.6

From: Eli Zaretskii <[email-masked]>
Date: Sun, 25 Dec 2016 17:52:37 +0200

> Date: Sat, 24 Dec 2016 19:51:13 +0200
> From: Eli Zaretskii <[email-masked]>
> Cc: [email-masked]
> 
> I see that ns_select calls block/unblock_input, which makes it unsafe
> when more than one thread is running.  It's quite possible that this
> is the reason.
> 
> I hope some NS expert could take a look at this and fix this.

One idea is to write an implementation of block_input and
unblock_input that uses atomic increment and decrement functions, then
use those only in ns_select.

Could someone with access to NS please try that?