mirror of
https://github.com/python/cpython.git
synced 2025-12-09 18:48:05 +00:00
gh-109693: Update _gil_runtime_state.last_holder to use pyatomic.h (#110605)
This commit is contained in:
parent
4a53a397c3
commit
2566434e59
2 changed files with 9 additions and 9 deletions
|
|
@ -8,7 +8,7 @@ extern "C" {
|
|||
# error "this header requires Py_BUILD_CORE define"
|
||||
#endif
|
||||
|
||||
#include "pycore_atomic.h" // _Py_atomic_address
|
||||
#include "pycore_atomic.h" // _Py_atomic_int
|
||||
#include "pycore_condvar.h" // PyCOND_T
|
||||
|
||||
#ifndef Py_HAVE_CONDVAR
|
||||
|
|
@ -25,7 +25,7 @@ struct _gil_runtime_state {
|
|||
unsigned long interval;
|
||||
/* Last PyThreadState holding / having held the GIL. This helps us
|
||||
know whether anyone else was scheduled after we dropped the GIL. */
|
||||
_Py_atomic_address last_holder;
|
||||
PyThreadState* last_holder;
|
||||
/* Whether the GIL is already taken (-1 if uninitialized). This is
|
||||
atomic because it can be read without any lock taken in ceval.c. */
|
||||
_Py_atomic_int locked;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue