mirror of
https://github.com/python/cpython.git
synced 2025-07-19 17:25:54 +00:00
Issue #12392: fix thread initialization on FreeBSD 6
On FreeBSD6, pthread_kill() doesn't work on the main thread before the creation of the first thread. Create therefore a dummy thread (no-op) a startup to initialize the pthread library. Add also a test for this use case, test written by Charles-François Natali.
This commit is contained in:
parent
fcb17e13da
commit
e71db4450c
2 changed files with 29 additions and 1 deletions
|
@ -144,7 +144,10 @@ typedef struct {
|
|||
* Initialization.
|
||||
*/
|
||||
|
||||
#ifdef _HAVE_BSDI
|
||||
/* On FreeBSD6, pthread_kill() doesn't work on the main thread before
|
||||
the creation of the first thread */
|
||||
#if defined(_HAVE_BSDI) \
|
||||
|| (defined(__FreeBSD__) && __FreeBSD_version < 700000)
|
||||
static
|
||||
void _noop(void)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue