pike.git / src / threads.c

version» Context lines:

pike.git/src/threads.c:164: Inside #if defined(__NT__)
   }    else    {    return errno;    }   }      #endif      #ifdef SIMULATE_COND_WITH_EVENT - PMOD_EXPORT int co_wait(COND_T *c, MUTEX_T *m) + PMOD_EXPORT int co_wait(COND_T *c, PIKE_MUTEX_T *m)   {    struct cond_t_queue me;    event_init(&me.event);    me.next=0;    mt_lock(& c->lock);       if(c->tail)    {    c->tail->next=&me;    c->tail=&me;
pike.git/src/threads.c:198: Inside #if defined(SIMULATE_COND_WITH_EVENT)
   /* Cancellation point?? */      #ifdef PIKE_DEBUG    if(me.next)    Pike_fatal("Wait on event return prematurely!!\n");   #endif       return 0;   }    - PMOD_EXPORT int co_wait_timeout(COND_T *c, MUTEX_T *m, long s, long nanos) + PMOD_EXPORT int co_wait_timeout(COND_T *c, PIKE_MUTEX_T *m, long s, long nanos)   {    struct cond_t_queue me;    event_init(&me.event);    me.next=0;    mt_lock(& c->lock);       if(c->tail)    {    c->tail->next=&me;    c->tail=&me;
pike.git/src/threads.c:383:   PMOD_EXPORT cpu_time_t threads_disabled_acc_time = 0;   PMOD_EXPORT cpu_time_t threads_disabled_start = 0;      #ifdef PIKE_DEBUG   static THREAD_T threads_disabled_thread = 0;   #endif   #ifdef INTERNAL_PROFILING   PMOD_EXPORT unsigned long thread_yields = 0;   #endif   static int th_running = 0; - static MUTEX_T interpreter_lock; - static MUTEX_T interpreter_lock_wanted; - MUTEX_T thread_table_lock; - static MUTEX_T interleave_lock; + static PIKE_MUTEX_T interpreter_lock; + static PIKE_MUTEX_T interpreter_lock_wanted; + PIKE_MUTEX_T thread_table_lock; + static PIKE_MUTEX_T interleave_lock;   static struct program *mutex_key = 0;   PMOD_EXPORT struct program *thread_id_prog = 0;   static struct program *thread_local_prog = 0;   PMOD_EXPORT ptrdiff_t thread_storage_offset;   static int live_threads = 0;   static COND_T live_threads_change;   static COND_T threads_disabled_change;      struct thread_local_var   {
pike.git/src/threads.c:3213:    struct farmer *neighbour;    void *field;    void (*harvest)(void *);    THREAD_T me;    COND_T harvest_moon;   #ifdef HAVE_BROKEN_LINUX_THREAD_EUID    int euid, egid;   #endif /* HAVE_BROKEN_LINUX_THREAD_EUID */   } *farmers;    - static MUTEX_T rosie; + static PIKE_MUTEX_T rosie;    -  +    static int _num_farmers, _num_idle_farmers;      static TH_RETURN_TYPE farm(void *_a)   {    struct farmer *me = (struct farmer *)_a;      #ifdef HAVE_BROKEN_LINUX_THREAD_EUID    /* Work-around for Linux's pthreads not propagating the    * effective uid & gid.    */