Skip to content

Commit 8ca8d3a

Browse files
committed
Replace HEAD_XX to INTERP_THREAD_XX
1 parent 2378caa commit 8ca8d3a

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

Python/pylifecycle.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2435,12 +2435,12 @@ finalize_subinterpreters(void)
24352435
struct pyinterpreters *interpreters = &runtime->interpreters;
24362436

24372437
/* Get the first interpreter in the list. */
2438-
HEAD_LOCK(runtime);
2438+
INTERP_THREAD_LOCK(main_interp);
24392439
PyInterpreterState *interp = interpreters->head;
24402440
if (interp == main_interp) {
24412441
interp = interp->next;
24422442
}
2443-
HEAD_UNLOCK(runtime);
2443+
INTERP_THREAD_UNLOCK(main_interp);
24442444

24452445
/* Bail out if there are no subinterpreters left. */
24462446
if (interp == NULL) {
@@ -2485,12 +2485,12 @@ finalize_subinterpreters(void)
24852485
assert(_PyThreadState_GET() == NULL);
24862486

24872487
/* Advance to the next interpreter. */
2488-
HEAD_LOCK(runtime);
2488+
INTERP_THREAD_LOCK(interp);
24892489
interp = interpreters->head;
24902490
if (interp == main_interp) {
24912491
interp = interp->next;
24922492
}
2493-
HEAD_UNLOCK(runtime);
2493+
INTERP_THREAD_UNLOCK(interp);
24942494
}
24952495

24962496
/* Switch back to the main interpreter. */

0 commit comments

Comments
 (0)