pike.git / src / threads.c

version» Context lines:

pike.git/src/threads.c:1:   #include "global.h" - RCSID("$Id: threads.c,v 1.40 1997/09/17 10:33:14 hubbe Exp $"); + RCSID("$Id: threads.c,v 1.41 1997/09/17 13:04:14 hubbe Exp $");      int num_threads = 1;   int threads_disabled = 0;      #ifdef _REENTRANT   #include "threads.h"   #include "array.h"   #include "object.h"   #include "pike_macros.h"   #include "callback.h"
pike.git/src/threads.c:198:    (unsigned int)m,    (unsigned int)OB2KEY(m->key)->mut,    (unsigned int) thread_id));    free_object(o);    error("Recursive mutex locks!\n");    }    }       if(m->key)    { -  check_objects_to_destruct(); +  destruct_objects_to_destruct();    if(m->key)    {    SWAP_OUT_CURRENT_THREAD();    do    {    THREADS_FPRINTF((stderr,"WAITING TO LOCK m:%08x\n",(unsigned int)m));    co_wait(& m->condition, & interpreter_lock);    }while(m->key);    SWAP_IN_CURRENT_THREAD();    }
pike.git/src/threads.c:243:    */       if(!args || IS_ZERO(sp-args))    {    if(m->key && OB2KEY(m->key)->owner == thread_id)    {    free_object(o);    error("Recursive mutex locks!\n");    }    } +  if(m->key) +  destruct_objects_to_destruct(); +     if(!m->key)    {    OB2KEY(o)->mut=m;    m->key=o;    i=1;    }       pop_n_elems(args);    if(i)    {