Another approach would be to add a working ptherad_sigmask in pthread-fixes.c, which we already use for Android IIRC.