pike.git / src / threads.c

version» Context lines:

pike.git/src/threads.c:1:   #include "global.h" - RCSID("$Id: threads.c,v 1.119 2000/04/15 05:05:28 hubbe Exp $"); + RCSID("$Id: threads.c,v 1.120 2000/04/18 06:53:48 jonasw Exp $");      int num_threads = 1;   int threads_disabled = 0;      #ifdef _REENTRANT   #include "threads.h"   #include "array.h"   #include "mapping.h"   #include "object.h"   #include "pike_macros.h"
pike.git/src/threads.c:1352:    *    */   static struct farmer {    struct farmer *neighbour;    void *field;    void (*harvest)(void *);    THREAD_T me;    COND_T harvest_moon;   } *farmers;    - static MUTEX_T rosie; + static MUTEX_T rosie STATIC_MUTEX_INIT;      static TH_RETURN_TYPE farm(void *_a)   {    struct farmer *me = (struct farmer *)_a;    do    {   /* if(farmers == me) fatal("Ouch!\n"); */   /* fprintf(stderr, "farm_begin %p\n",me ); */    me->harvest( me->field );   /* fprintf(stderr, "farm_end %p\n", me); */