mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +00:00
[3.11] gh-96017: Fix some compiler warnings (GH-96018) (#96106)
- only define recreate_gil with ifdef HAVE_FORK.
(cherry picked from commit d9c1b746b5
)
Co-authored-by: Christian Heimes <christian@python.org>
This commit is contained in:
parent
19ec4d40a2
commit
eecbeec083
1 changed files with 2 additions and 0 deletions
|
@ -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,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue