On 01/25/21 11:57, Max Reitz wrote: > On 23.01.21 01:41, Laszlo Ersek wrote: >> On 01/22/21 22:26, Laszlo Ersek wrote: >> >>> I'm drifting towards an overhaul of coroutine-sigaltstack, based on my >>> personal understanding of POSIX, but given that I can absolutely not >>> *test* coroutine-sigaltstack on the platforms where it actually matters, >>> an "overhaul" by me would be reckless. >>> >>> I didn't expect these skeletons when I first read Max's "Thread safety >>> of coroutine-sigaltstack" email :/ >>> >>> Max, after having worked on top of your patch for a few hours, I >>> officially endorse your mutex approach. I can't encourage you or myself >>> to touch this code, in good conscience. It's not that it's "bad"; it's >>> inexplicable and (to me) untestable. > > On one hand, that’s too bad; on the other perhaps it’s just for the > better to get all of this out of our minds again (for now)... O:) > >> I'm attaching a patch (based on 0e3246263068). I'm not convinced that I >> should take responsibility for this, given the lack of testability on my >> end. So I'm not posting it stand-alone even as an RFC. I've built it and >> have booted one of my existent domains with it, but that's all. > > FWIW, it looks good to me. We should keep it in mind if in the future > for some reason sigaltstack becomes more important, but for now I’m not > too sad to abort any improvement efforts.
OK -- so do you plan to post your mutex approach stand-alone? (Sorry if that's already been done and I've missed it.) I actually feel somewhat safe regarding my patch, as long as it is *only* executed on Linux hosts, and on other hosts that claim conformance to POSIX. But, of course, this whole thing has come up because of OSX... and I don't have the first clue about OSX. (For example whether sigsuspend() on OSX is prone to a spurious wakeup in response to SIGCONT.) Thanks Laszlo