Branch: Tag:

2001-11-01

2001-11-01 18:40:12 by Martin Stjernholm <mast@lysator.liu.se>

Fixed some bugs with VERBOSE_THREADS_DEBUG. Added some debug to better
detect thread switches while threads_disabled is set.

Rev: src/pike_threadlib.h:1.10
Rev: src/threads.c:1.172
Rev: src/threads.h:1.117

1:   /* -  * $Id: threads.h,v 1.116 2001/11/01 18:19:11 mast Exp $ +  * $Id: threads.h,v 1.117 2001/11/01 18:40:12 mast Exp $    */   #ifndef THREADS_H   #define THREADS_H
31:   /* If threads are disabled, we already hold the lock. */   #define LOCK_IMUTEX(im) do { \    if (!threads_disabled) { \ -  THREADS_FPRINTF(0, (stderr, "Locking IMutex 0x%08p...\n", (im))); \ +  THREADS_FPRINTF(0, (stderr, "Locking IMutex 0x%p...\n", (im))); \    THREADS_ALLOW(); \    mt_lock(&((im)->lock)); \    THREADS_DISALLOW(); \
41:   /* If threads are disabled, the lock will be released later. */   #define UNLOCK_IMUTEX(im) do { \    if (!threads_disabled) { \ -  THREADS_FPRINTF(0, (stderr, "Unlocking IMutex 0x%08p...\n", (im))); \ +  THREADS_FPRINTF(0, (stderr, "Unlocking IMutex 0x%p...\n", (im))); \    mt_unlock(&((im)->lock)); \    } \    } while(0)