pike.git / src / threads.c

version» Context lines:

pike.git/src/threads.c:1:   #include "global.h" - RCSID("$Id: threads.c,v 1.28 1997/09/02 22:18:07 grubba Exp $"); + RCSID("$Id: threads.c,v 1.29 1997/09/03 03:39:58 per 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:317:    if(sp[-1].type != T_OBJECT)    error("Bad argument 1 to condition->wait()\n");       key=sp[-1].u.object;       if(key->prog != mutex_key)    error("Bad argument 1 to condition->wait()\n");       mt_lock(&mutex_kluge);    mut=OB2KEY(key)->mut; +  if(!mut) +  error("Bad argument 1 to condition->wait()\n"); +     THREADS_ALLOW();       /* Unlock mutex */    mut->key=0;    OB2KEY(key)->mut=0;    co_signal(& mut->condition);       /* Wait and allow mutex operations */    co_wait(c,&mutex_kluge);