Skip to content

Commit

Permalink
[3.11] gh-96017: Fix some compiler warnings (GH-96018) (#96106)
Browse files Browse the repository at this point in the history
- only define recreate_gil with ifdef HAVE_FORK.
(cherry picked from commit d9c1b74)

Co-authored-by: Christian Heimes <christian@python.org>
  • Loading branch information
tiran authored Oct 5, 2022
1 parent 19ec4d4 commit eecbeec
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Python/ceval_gil.h
Original file line number Diff line number Diff line change
Expand Up @@ -133,12 +133,14 @@ static void destroy_gil(struct _gil_runtime_state *gil)
_Py_ANNOTATE_RWLOCK_DESTROY(&gil->locked);
}

#ifdef HAVE_FORK
static void recreate_gil(struct _gil_runtime_state *gil)
{
_Py_ANNOTATE_RWLOCK_DESTROY(&gil->locked);
/* XXX should we destroy the old OS resources here? */
create_gil(gil);
}
#endif

static void
drop_gil(struct _ceval_runtime_state *ceval, struct _ceval_state *ceval2,
Expand Down

0 comments on commit eecbeec

Please sign in to comment.