pike.git / src / threads.c

version» Context lines:

pike.git/src/threads.c:2357:    push_static_text("*/)");    f_add(3);    } else {    push_static_text("Thread.Mutex()");    }   }      void init_mutex_obj(struct object *UNUSED(o))   {    co_init(& THIS_MUTEX->condition); + #ifdef PIKE_NULL_IS_SPECIAL    THIS_MUTEX->key=0;    THIS_MUTEX->num_waiting = 0; -  + #endif   }      void exit_mutex_obj(struct object *UNUSED(o))   {    struct mutex_storage *m = THIS_MUTEX;    struct object *key = m->key;       THREADS_FPRINTF(1, "DESTROYING MUTEX m:%p\n", THIS_MUTEX);      #ifndef PICKY_MUTEX
pike.git/src/threads.c:2453:    *! is destructed (eg by not having any references left).    *!    *! @seealso    *! @[Mutex], @[Condition]    */   #define THIS_KEY ((struct key_storage *)(CURRENT_STORAGE))   void init_mutex_key_obj(struct object *UNUSED(o))   {    THREADS_FPRINTF(1, "KEY k:%p, t:%p\n",    THIS_KEY, Pike_interpreter.thread_state); + #ifdef PIKE_NULL_IS_SPECIAL    THIS_KEY->mut=0;    THIS_KEY->mutex_obj = NULL; -  + #endif    THIS_KEY->owner = Pike_interpreter.thread_state;    THIS_KEY->owner_obj = Pike_interpreter.thread_state->thread_obj;    if (THIS_KEY->owner_obj)    add_ref(THIS_KEY->owner_obj);    THIS_KEY->initialized=1;   }      void exit_mutex_key_obj(struct object *DEBUGUSED(o))   {    THREADS_FPRINTF(1, "UNLOCK k:%p m:(%p) t:%p o:%p\n",