pike.git / src / threads.c

version» Context lines:

pike.git/src/threads.c:1:   /*   || This file is part of Pike. For copyright information see COPYRIGHT.   || Pike is distributed under GPL, LGPL and MPL. See the file COPYING   || for more information. - || $Id: threads.c,v 1.205 2004/04/26 16:21:18 mast Exp $ + || $Id: threads.c,v 1.206 2005/11/15 10:31:40 grubba Exp $   */      #include "global.h" - RCSID("$Id: threads.c,v 1.205 2004/04/26 16:21:18 mast Exp $"); + RCSID("$Id: threads.c,v 1.206 2005/11/15 10:31:40 grubba Exp $");      PMOD_EXPORT int num_threads = 1;   PMOD_EXPORT int threads_disabled = 0;      /* #define PICKY_MUTEX */      #ifdef _REENTRANT   #include "threads.h"   #include "array.h"   #include "mapping.h"
pike.git/src/threads.c:1334:    if (THIS_KEY->owner) {    free_object(THIS_KEY->owner);    THIS_KEY->owner=0;    }    THIS_KEY->mut=0;    THIS_KEY->initialized=0;    mutex_obj = THIS_KEY->mutex_obj;    THIS_KEY->mutex_obj = NULL;    if (mut->num_waiting)    co_signal(&mut->condition); -  else if (!mutex_obj->prog) +  else if (mutex_obj && !mutex_obj->prog)    co_destroy (&mut->condition); -  +  if (mutex_obj)    free_object(mutex_obj);    }   }      #define THIS_COND ((COND_T *)(CURRENT_STORAGE))      /*! @class Condition    *!    *! Implementation of condition variables.    *!