pike.git / src / threads.c

version» Context lines:

pike.git/src/threads.c:1:   #include "global.h" - RCSID("$Id: threads.c,v 1.36 1997/09/08 19:36:53 hubbe Exp $"); + RCSID("$Id: threads.c,v 1.37 1997/09/08 19:58:42 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:180:   {    struct mutex_storage *m;    struct object *o;       pop_n_elems(args);    m=THIS_MUTEX;    /* Needs to be cloned here, since create()    * might use threads.    */    o=clone_object(mutex_key,0); -  if(!args && IS_ZERO(sp-args)) +  if(!args || IS_ZERO(sp-args))    {    if(m->key && OB2KEY(m->key)->owner == thread_id)    {    THREADS_FPRINTF((stderr, "Recursive LOCK k:%08x, m:%08x(%08x), t:%08x\n",    (unsigned int)OB2KEY(m->key),    (unsigned int)m,    (unsigned int)OB2KEY(m->key)->mut,    (unsigned int) thread_id));    free_object(o);    error("Recursive mutex locks!\n");