diff options
author | Antoine Pitrou <pitrou@free.fr> | 2017-09-07 16:56:24 (GMT) |
---|---|---|
committer | Victor Stinner <victor.stinner@gmail.com> | 2017-09-07 16:56:24 (GMT) |
commit | a6a4dc816d68df04a7d592e0b6af8c7ecc4d4344 (patch) | |
tree | 1c31738009bee903417cea928e705a112aea2392 /Modules/faulthandler.c | |
parent | 1f06a680de465be0c24a78ea3b610053955daa99 (diff) | |
download | cpython-a6a4dc816d68df04a7d592e0b6af8c7ecc4d4344.zip cpython-a6a4dc816d68df04a7d592e0b6af8c7ecc4d4344.tar.gz cpython-a6a4dc816d68df04a7d592e0b6af8c7ecc4d4344.tar.bz2 |
bpo-31370: Remove support for threads-less builds (#3385)
* Remove Setup.config
* Always define WITH_THREAD for compatibility.
Diffstat (limited to 'Modules/faulthandler.c')
-rw-r--r-- | Modules/faulthandler.c | 12 |
1 files changed, 1 insertions, 11 deletions
diff --git a/Modules/faulthandler.c b/Modules/faulthandler.c index 39b70bc..4f3d971 100644 --- a/Modules/faulthandler.c +++ b/Modules/faulthandler.c @@ -17,9 +17,7 @@ /* Allocate at maximum 100 MB of the stack to raise the stack overflow */ #define STACK_OVERFLOW_MAX_SIZE (100*1024*1024) -#ifdef WITH_THREAD -# define FAULTHANDLER_LATER -#endif +#define FAULTHANDLER_LATER #ifndef MS_WINDOWS /* register() is useless on Windows, because only SIGSEGV, SIGABRT and @@ -228,7 +226,6 @@ faulthandler_dump_traceback(int fd, int all_threads, reentrant = 1; -#ifdef WITH_THREAD /* SIGSEGV, SIGFPE, SIGABRT, SIGBUS and SIGILL are synchronous signals and are thus delivered to the thread that caused the fault. Get the Python thread state of the current thread. @@ -238,9 +235,6 @@ faulthandler_dump_traceback(int fd, int all_threads, used. Read the thread local storage (TLS) instead: call PyGILState_GetThisThreadState(). */ tstate = PyGILState_GetThisThreadState(); -#else - tstate = _PyThreadState_UncheckedGet(); -#endif if (all_threads) { (void)_Py_DumpTracebackThreads(fd, NULL, tstate); @@ -977,7 +971,6 @@ faulthandler_sigsegv(PyObject *self, PyObject *args) Py_RETURN_NONE; } -#ifdef WITH_THREAD static void faulthandler_fatal_error_thread(void *plock) { @@ -1027,7 +1020,6 @@ faulthandler_fatal_error_c_thread(PyObject *self, PyObject *args) Py_RETURN_NONE; } -#endif static PyObject * faulthandler_sigfpe(PyObject *self, PyObject *args) @@ -1198,11 +1190,9 @@ static PyMethodDef module_methods[] = { "a SIGSEGV or SIGBUS signal depending on the platform")}, {"_sigsegv", faulthandler_sigsegv, METH_VARARGS, PyDoc_STR("_sigsegv(release_gil=False): raise a SIGSEGV signal")}, -#ifdef WITH_THREAD {"_fatal_error_c_thread", faulthandler_fatal_error_c_thread, METH_NOARGS, PyDoc_STR("fatal_error_c_thread(): " "call Py_FatalError() in a new C thread.")}, -#endif {"_sigabrt", faulthandler_sigabrt, METH_NOARGS, PyDoc_STR("_sigabrt(): raise a SIGABRT signal")}, {"_sigfpe", (PyCFunction)faulthandler_sigfpe, METH_NOARGS, |