|
numpy 2.0.0
|
#include <setjmp.h>#include <signal.h>Go to the source code of this file.
Defines | |
| #define | SIGSETJMP(arg1, arg2) setjmp(arg1) |
| #define | SIGLONGJMP(arg1, arg2) longjmp(arg1, arg2) |
| #define | SIGJMP_BUF jmp_buf |
| #define | NPY_SIGINT_ON |
| #define | NPY_SIGINT_OFF |
| #define NPY_SIGINT_OFF |
} \
PyOS_setsig(SIGINT, _npy_sig_save); \
}
| #define NPY_SIGINT_ON |
{ \
PyOS_sighandler_t _npy_sig_save; \
_npy_sig_save = PyOS_setsig(SIGINT, _PyArray_SigintHandler); \
if (SIGSETJMP(*((SIGJMP_BUF *)_PyArray_GetSigintBuf()), \
1) == 0) { \
| #define SIGJMP_BUF jmp_buf |
| #define SIGLONGJMP | ( | arg1, | |
| arg2 | |||
| ) | longjmp(arg1, arg2) |
| #define SIGSETJMP | ( | arg1, | |
| arg2 | |||
| ) | setjmp(arg1) |
and store the old one.
the handler should basically just cause a return to the calling function for finish work.
restore the old signal handler
</blockquote>
to return from signal handling. They have a __try and __except extension to C instead but what about mingw?).
how to handle threads: apparently whether signals are delivered to every thread of the process or the "invoking" thread is platform dependent. --- we don't handle threads for now.
do we need to worry about re-entrance. For now, assume the code will not call-back into itself.
</blockquote>
</blockquote>