mirror of
https://github.com/python/cpython.git
synced 2025-12-04 16:43:27 +00:00
gh-106320: Remove private _PyThread_at_fork_reinit() function (#108601)
Move the private function to the internal C API (pycore_pythread.h) and no longer exports it.
This commit is contained in:
parent
8d8bf0b514
commit
07cf33ef24
2 changed files with 8 additions and 7 deletions
|
|
@ -4,13 +4,6 @@
|
||||||
|
|
||||||
#define PYTHREAD_INVALID_THREAD_ID ((unsigned long)-1)
|
#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
|
#ifdef HAVE_PTHREAD_H
|
||||||
/* Darwin needs pthread.h to know type name the pthread_key_t. */
|
/* Darwin needs pthread.h to know type name the pthread_key_t. */
|
||||||
# include <pthread.h>
|
# include <pthread.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
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue