mirror of
https://github.com/python/cpython.git
synced 2025-10-07 07:31:46 +00:00
gh-111863: Rename Py_NOGIL
to Py_GIL_DISABLED
(#111864)
Rename Py_NOGIL to Py_GIL_DISABLED
This commit is contained in:
parent
1c8f912ebd
commit
3b3ec0d77f
39 changed files with 82 additions and 81 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue