Skip to content

Commit 29c4ccb

Browse files
committed
HEAD_LOCK change to INTERP_THREAD_LOCK
1 parent afbaf04 commit 29c4ccb

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

Python/instrumentation.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -988,13 +988,12 @@ set_global_version(PyThreadState *tstate, uint32_t version)
988988

989989
#ifdef Py_GIL_DISABLED
990990
// Set the version on all threads in free-threaded builds.
991-
_PyRuntimeState *runtime = &_PyRuntime;
992-
HEAD_LOCK(runtime);
991+
INTERP_THREAD_LOCK(interp);
993992
for (tstate = interp->threads.head; tstate;
994993
tstate = PyThreadState_Next(tstate)) {
995994
set_version_raw(&tstate->eval_breaker, version);
996995
};
997-
HEAD_UNLOCK(runtime);
996+
INTERP_THREAD_UNLOCK(interp);
998997
#else
999998
// Normal builds take the current version from instrumentation_version when
1000999
// attaching a thread, so we only have to set the current thread's version.

0 commit comments

Comments
 (0)