summaryrefslogtreecommitdiffstats
path: root/Python/ceval_gil.h
diff options
context:
space:
mode:
authorEric Snow <ericsnowcurrently@gmail.com>2022-05-28 00:56:30 (GMT)
committerGitHub <noreply@github.com>2022-05-28 00:56:30 (GMT)
commit36374251aa39c0a89be277fb76439bacc709f8b7 (patch)
treea3bba5dee5d355f132201b514ba73ebe01838a16 /Python/ceval_gil.h
parentcf63b80bc482ef971ecb6d3ed9a1dc4a93d73744 (diff)
downloadcpython-36374251aa39c0a89be277fb76439bacc709f8b7.zip
cpython-36374251aa39c0a89be277fb76439bacc709f8b7.tar.gz
cpython-36374251aa39c0a89be277fb76439bacc709f8b7.tar.bz2
[3.11] bpo-40514: Drop EXPERIMENTAL_ISOLATED_SUBINTERPRETERS (gh-93185) (GH-93306)
(cherry picked from commit caa279d6fd5f151e57f891cd4f6ba51b532501c6) This was added for bpo-40514 (gh-84694) to test out a per-interpreter GIL. However, it has since proven unnecessary to keep the experiment in the repo. (It can be done as a branch in a fork like normal.) So here we are removing: * the configure option * the macro * the code enabled by the macro Automerge-Triggered-By: GH:ericsnowcurrently
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 9b8b432..1b2dc7f 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;
}