Commit 3399e69c authored by Henrik (Grubba) Grubbström's avatar Henrik (Grubba) Grubbström
Browse files

Thread.Mutex: Fixed wait count leak on threads_disabled in lock().

If the mutex was already locked when lock() was called in a
threads_disabled context, the wait count was increased but
no corresponding wait was performed.
parent a94a08ea
......@@ -2270,12 +2270,12 @@ void f_mutex_lock(INT32 args)
if(key->next)
{
m->num_waiting++;
if(threads_disabled)
{
free_object(o);
Pike_error("Cannot wait for mutexes when threads are disabled!\n");
}
m->num_waiting++;
do
{
THREADS_FPRINTF(1, "WAITING TO LOCK m:%p\n", m);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment