mirror of
https://github.com/python/cpython.git
synced 2025-11-01 10:45:30 +00:00
Revert "bpo-33608: Factor out a private, per-interpreter _Py_AddPendingCall(). (gh-13714)" (GH-13780)
This reverts commit 6a150bcaeb.
This commit is contained in:
parent
49a7e34797
commit
e225bebc14
10 changed files with 185 additions and 320 deletions
|
|
@ -21,7 +21,6 @@
|
|||
#include <process.h>
|
||||
#endif
|
||||
#endif
|
||||
#include "internal/pycore_pystate.h"
|
||||
|
||||
#ifdef HAVE_SIGNAL_H
|
||||
#include <signal.h>
|
||||
|
|
@ -260,7 +259,6 @@ trip_signal(int sig_num)
|
|||
/* Notify ceval.c */
|
||||
_PyRuntimeState *runtime = &_PyRuntime;
|
||||
PyThreadState *tstate = _PyRuntimeState_GetThreadState(runtime);
|
||||
PyInterpreterState *interp = runtime->interpreters.main;
|
||||
_PyEval_SignalReceived(&runtime->ceval);
|
||||
|
||||
/* And then write to the wakeup fd *after* setting all the globals and
|
||||
|
|
@ -301,10 +299,7 @@ trip_signal(int sig_num)
|
|||
{
|
||||
/* Py_AddPendingCall() isn't signal-safe, but we
|
||||
still use it for this exceptional case. */
|
||||
_PyEval_AddPendingCall(tstate,
|
||||
&runtime->ceval,
|
||||
&interp->ceval,
|
||||
runtime->main_thread,
|
||||
_PyEval_AddPendingCall(tstate, &runtime->ceval,
|
||||
report_wakeup_send_error,
|
||||
(void *)(intptr_t) last_error);
|
||||
}
|
||||
|
|
@ -323,10 +318,7 @@ trip_signal(int sig_num)
|
|||
{
|
||||
/* Py_AddPendingCall() isn't signal-safe, but we
|
||||
still use it for this exceptional case. */
|
||||
_PyEval_AddPendingCall(tstate,
|
||||
&runtime->ceval,
|
||||
&interp->ceval,
|
||||
runtime->main_thread,
|
||||
_PyEval_AddPendingCall(tstate, &runtime->ceval,
|
||||
report_wakeup_write_error,
|
||||
(void *)(intptr_t)errno);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue