I am trying to build a user level thread library like pthreads.
I want to use swapcontext within the signal handler. But since it is not a signal safe function, it is not advisable to use it. Can somebody suggest how to use it inside the signal handler. Can I use it by disabling signals?
Also can someone please explain me the exact meaning of signal-safe functions?