Branch: Tag:


2017-08-09 11:50:28 by Henrik Grubbström (Grubba) <>

Thread: Fix disable_threads issue in thread_create().

If disable_threads() was performed while a different thread
was spawning a new thread, the thread spawning the new thread
wouldn't wait for threads to be reenabled before returning.

Potential fix for PIKE-18 (#8018).

1931:    SWAP_OUT_CURRENT_THREAD();    THREADS_FPRINTF(0, "f_thread_create %p waiting...\n", thread_state);    while (thread_state->status == THREAD_NOT_STARTED) -  low_co_wait_interpreter (&thread_state->status_change); +  co_wait_interpreter (&thread_state->status_change);    THREADS_FPRINTF(0, "f_thread_create %p continue\n", thread_state);    SWAP_IN_CURRENT_THREAD();    } else {