Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Rename stop-the-world functions
  • Loading branch information
colesbury committed Dec 18, 2023
commit 4f7b6ceeab4f5bd4fe93e75ea92b4424961d928b
8 changes: 4 additions & 4 deletions Include/internal/pycore_pystate.h
Original file line number Diff line number Diff line change
Expand Up @@ -164,14 +164,14 @@ extern void _PyThreadState_Suspend(PyThreadState *tstate);
// them from reattaching until the stop-the-world pause is complete.
//
// NOTE: This is a no-op outside of Py_GIL_DISABLED builds.
extern void _PyRuntimeState_StopTheWorld(_PyRuntimeState *runtime);
extern void _PyRuntimeState_StartTheWorld(_PyRuntimeState *runtime);
extern void _PyEval_StopTheWorldAll(_PyRuntimeState *runtime);
extern void _PyEval_StartTheWorldAll(_PyRuntimeState *runtime);

// Perform a stop-the-world pause for threads in the specified interpreter.
//
// NOTE: This is a no-op outside of Py_GIL_DISABLED builds.
extern void _PyInterpreterState_StopTheWorld(PyInterpreterState *interp);
extern void _PyInterpreterState_StartTheWorld(PyInterpreterState *interp);
extern void _PyEval_StopTheWorld(PyInterpreterState *interp);
extern void _PyEval_StartTheWorld(PyInterpreterState *interp);


static inline void
Expand Down
8 changes: 4 additions & 4 deletions Python/pystate.c
Original file line number Diff line number Diff line change
Expand Up @@ -2055,31 +2055,31 @@ start_the_world(struct _stoptheworld_state *stw)
#endif // Py_GIL_DISABLED

void
_PyRuntimeState_StopTheWorld(_PyRuntimeState *runtime)
_PyEval_StopTheWorldAll(_PyRuntimeState *runtime)
{
#ifdef Py_GIL_DISABLED
stop_the_world(&runtime->stoptheworld);
#endif
}

void
_PyRuntimeState_StartTheWorld(_PyRuntimeState *runtime)
_PyEval_StartTheWorldAll(_PyRuntimeState *runtime)
{
#ifdef Py_GIL_DISABLED
start_the_world(&runtime->stoptheworld);
#endif
}

void
_PyInterpreterState_StopTheWorld(PyInterpreterState *interp)
_PyEval_StopTheWorld(PyInterpreterState *interp)
{
#ifdef Py_GIL_DISABLED
stop_the_world(&interp->stoptheworld);
#endif
}

void
_PyInterpreterState_StartTheWorld(PyInterpreterState *interp)
_PyEval_StartTheWorld(PyInterpreterState *interp)
{
#ifdef Py_GIL_DISABLED
start_the_world(&interp->stoptheworld);
Expand Down