summaryrefslogtreecommitdiffstats
path: root/Python/ceval_gil.h
diff options
context:
space:
mode:
authorVictor Stinner <vstinner@python.org>2020-05-19 22:27:46 (GMT)
committerGitHub <noreply@github.com>2020-05-19 22:27:46 (GMT)
commit9512ad74b0fcaff023c1ade75313dc8e249aef78 (patch)
treed8a0949f5e3cea7910a33b8ec7d723804e21d8dd /Python/ceval_gil.h
parentb008445a7b93c8c5d4773d33277c6fe815afca7b (diff)
downloadcpython-9512ad74b0fcaff023c1ade75313dc8e249aef78.zip
cpython-9512ad74b0fcaff023c1ade75313dc8e249aef78.tar.gz
cpython-9512ad74b0fcaff023c1ade75313dc8e249aef78.tar.bz2
[3.9] bpo-40514: Remove --with-experimental-isolated-subinterpreters in 3.9 (GH-20228)
Remove --with-experimental-isolated-subinterpreters configure option in Python 3.9: the experiment continues in the master branch, but it's no longer needed in 3.9.
Diffstat (limited to 'Python/ceval_gil.h')
-rw-r--r--Python/ceval_gil.h18
1 files changed, 0 insertions, 18 deletions
diff --git a/Python/ceval_gil.h b/Python/ceval_gil.h
index 56944b8..3510675 100644
--- a/Python/ceval_gil.h
+++ b/Python/ceval_gil.h
@@ -144,11 +144,7 @@ static void
drop_gil(struct _ceval_runtime_state *ceval, struct _ceval_state *ceval2,
PyThreadState *tstate)
{
-#ifdef EXPERIMENTAL_ISOLATED_SUBINTERPRETERS
- struct _gil_runtime_state *gil = &ceval2->gil;
-#else
struct _gil_runtime_state *gil = &ceval->gil;
-#endif
if (!_Py_atomic_load_relaxed(&gil->locked)) {
Py_FatalError("drop_gil: GIL is not locked");
}
@@ -232,11 +228,7 @@ take_gil(PyThreadState *tstate)
PyInterpreterState *interp = tstate->interp;
struct _ceval_runtime_state *ceval = &interp->runtime->ceval;
struct _ceval_state *ceval2 = &interp->ceval;
-#ifdef EXPERIMENTAL_ISOLATED_SUBINTERPRETERS
- struct _gil_runtime_state *gil = &ceval2->gil;
-#else
struct _gil_runtime_state *gil = &ceval->gil;
-#endif
/* Check that _PyEval_InitThreads() was called to create the lock */
assert(gil_created(gil));
@@ -328,22 +320,12 @@ _ready:
void _PyEval_SetSwitchInterval(unsigned long microseconds)
{
-#ifdef EXPERIMENTAL_ISOLATED_SUBINTERPRETERS
- PyInterpreterState *interp = PyInterpreterState_Get();
- struct _gil_runtime_state *gil = &interp->ceval.gil;
-#else
struct _gil_runtime_state *gil = &_PyRuntime.ceval.gil;
-#endif
gil->interval = microseconds;
}
unsigned long _PyEval_GetSwitchInterval()
{
-#ifdef EXPERIMENTAL_ISOLATED_SUBINTERPRETERS
- PyInterpreterState *interp = PyInterpreterState_Get();
- struct _gil_runtime_state *gil = &interp->ceval.gil;
-#else
struct _gil_runtime_state *gil = &_PyRuntime.ceval.gil;
-#endif
return gil->interval;
}