mirror of https://github.com/python/cpython
GH-108614: Unbreak emscripten build (GH-109132)
This commit is contained in:
parent
ccd48623d4
commit
501f2dc527
|
@ -18,6 +18,7 @@ _Py_CheckEmscriptenSignalsPeriodically(void);
|
|||
#define _Py_CHECK_EMSCRIPTEN_SIGNALS_PERIODICALLY() _Py_CheckEmscriptenSignalsPeriodically()
|
||||
|
||||
extern int Py_EMSCRIPTEN_SIGNAL_HANDLING;
|
||||
extern int _Py_emscripten_signal_clock;
|
||||
|
||||
#else
|
||||
|
||||
|
|
|
@ -154,8 +154,8 @@ dummy_func(
|
|||
|
||||
inst(RESUME_CHECK, (--)) {
|
||||
#if defined(__EMSCRIPTEN__)
|
||||
DEOPT_IF(emscripten_signal_clock == 0, RESUME);
|
||||
emscripten_signal_clock -= Py_EMSCRIPTEN_SIGNAL_HANDLING;
|
||||
DEOPT_IF(_Py_emscripten_signal_clock == 0, RESUME);
|
||||
_Py_emscripten_signal_clock -= Py_EMSCRIPTEN_SIGNAL_HANDLING;
|
||||
#endif
|
||||
/* Possibly combine these two checks */
|
||||
DEOPT_IF(_PyFrame_GetCode(frame)->_co_instrumentation_version
|
||||
|
|
|
@ -39,16 +39,16 @@ _Py_CheckEmscriptenSignals(void)
|
|||
}
|
||||
|
||||
#define PY_EMSCRIPTEN_SIGNAL_INTERVAL 50
|
||||
static int emscripten_signal_clock = PY_EMSCRIPTEN_SIGNAL_INTERVAL;
|
||||
int _Py_emscripten_signal_clock = PY_EMSCRIPTEN_SIGNAL_INTERVAL;
|
||||
|
||||
void
|
||||
_Py_CheckEmscriptenSignalsPeriodically(void)
|
||||
{
|
||||
if (emscripten_signal_clock == 0) {
|
||||
emscripten_signal_clock = PY_EMSCRIPTEN_SIGNAL_INTERVAL;
|
||||
if (_Py_emscripten_signal_clock == 0) {
|
||||
_Py_emscripten_signal_clock = PY_EMSCRIPTEN_SIGNAL_INTERVAL;
|
||||
_Py_CheckEmscriptenSignals();
|
||||
}
|
||||
else if (Py_EMSCRIPTEN_SIGNAL_HANDLING) {
|
||||
emscripten_signal_clock--;
|
||||
_Py_emscripten_signal_clock--;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -9,8 +9,8 @@
|
|||
|
||||
case RESUME_CHECK: {
|
||||
#if defined(__EMSCRIPTEN__)
|
||||
DEOPT_IF(emscripten_signal_clock == 0, RESUME);
|
||||
emscripten_signal_clock -= Py_EMSCRIPTEN_SIGNAL_HANDLING;
|
||||
DEOPT_IF(_Py_emscripten_signal_clock == 0, RESUME);
|
||||
_Py_emscripten_signal_clock -= Py_EMSCRIPTEN_SIGNAL_HANDLING;
|
||||
#endif
|
||||
/* Possibly combine these two checks */
|
||||
DEOPT_IF(_PyFrame_GetCode(frame)->_co_instrumentation_version
|
||||
|
|
|
@ -28,8 +28,8 @@
|
|||
|
||||
TARGET(RESUME_CHECK) {
|
||||
#if defined(__EMSCRIPTEN__)
|
||||
DEOPT_IF(emscripten_signal_clock == 0, RESUME);
|
||||
emscripten_signal_clock -= Py_EMSCRIPTEN_SIGNAL_HANDLING;
|
||||
DEOPT_IF(_Py_emscripten_signal_clock == 0, RESUME);
|
||||
_Py_emscripten_signal_clock -= Py_EMSCRIPTEN_SIGNAL_HANDLING;
|
||||
#endif
|
||||
/* Possibly combine these two checks */
|
||||
DEOPT_IF(_PyFrame_GetCode(frame)->_co_instrumentation_version
|
||||
|
|
Loading…
Reference in New Issue