diff --git a/Include/cpython/pythread.h b/Include/cpython/pythread.h index ce4ec8f65b15ea..cd2aab72d52df3 100644 --- a/Include/cpython/pythread.h +++ b/Include/cpython/pythread.h @@ -4,13 +4,6 @@ #define PYTHREAD_INVALID_THREAD_ID ((unsigned long)-1) -#ifdef HAVE_FORK -/* Private function to reinitialize a lock at fork in the child process. - Reset the lock to the unlocked state. - Return 0 on success, return -1 on error. */ -PyAPI_FUNC(int) _PyThread_at_fork_reinit(PyThread_type_lock *lock); -#endif /* HAVE_FORK */ - #ifdef HAVE_PTHREAD_H /* Darwin needs pthread.h to know type name the pthread_key_t. */ # include diff --git a/Include/internal/pycore_pythread.h b/Include/internal/pycore_pythread.h index 44846c0fc4b4c3..5ec2abda91e86b 100644 --- a/Include/internal/pycore_pythread.h +++ b/Include/internal/pycore_pythread.h @@ -75,6 +75,14 @@ struct _pythread_runtime_state { }; +#ifdef HAVE_FORK +/* Private function to reinitialize a lock at fork in the child process. + Reset the lock to the unlocked state. + Return 0 on success, return -1 on error. */ +extern int _PyThread_at_fork_reinit(PyThread_type_lock *lock); +#endif /* HAVE_FORK */ + + #ifdef __cplusplus } #endif