gh-111863: Rename Py_NOGIL to Py_GIL_DISABLED (#111864)

Rename Py_NOGIL to Py_GIL_DISABLED
This commit is contained in:
Hugo van Kemenade 2023-11-20 15:52:00 +02:00 committed by GitHub
parent 1c8f912ebd
commit 3b3ec0d77f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
39 changed files with 82 additions and 81 deletions

View file

@ -1857,7 +1857,7 @@ tstate_deactivate(PyThreadState *tstate)
static int
tstate_try_attach(PyThreadState *tstate)
{
#ifdef Py_NOGIL
#ifdef Py_GIL_DISABLED
int expected = _Py_THREAD_DETACHED;
if (_Py_atomic_compare_exchange_int(
&tstate->state,
@ -1877,7 +1877,7 @@ static void
tstate_set_detached(PyThreadState *tstate)
{
assert(tstate->state == _Py_THREAD_ATTACHED);
#ifdef Py_NOGIL
#ifdef Py_GIL_DISABLED
_Py_atomic_store_int(&tstate->state, _Py_THREAD_DETACHED);
#else
tstate->state = _Py_THREAD_DETACHED;