Branch: Tag:

1998-11-20

1998-11-20 18:38:46 by Fredrik Hübinette (Hubbe) <hubbe@hubbe.net>

more debug

Rev: src/interpret.c:1.108
Rev: src/threads.h:1.57

1:   /* -  * $Id: threads.h,v 1.56 1998/11/20 08:18:54 hubbe Exp $ +  * $Id: threads.h,v 1.57 1998/11/20 18:38:46 hubbe Exp $    */   #ifndef THREADS_H   #define THREADS_H
350:   #define DO_IF_PROFILING(X)   #endif    + #ifdef DEBUG + #define DO_IF_DEBUG(X) X + #else + #define DO_IF_DEBUG(X) + #endif +    #define SWAP_OUT_THREAD(_tmp) do { \    (_tmp)->swapped=1; \    (_tmp)->evaluator_stack=evaluator_stack;\
364:    (_tmp)->thread_id=thread_id;\    DO_IF_PROFILING( (_tmp)->accounted_time=accounted_time; ) \    DO_IF_PROFILING( (_tmp)->time_base = gethrtime() - time_base; ) \ +  DO_IF_DEBUG( DO_IF_PROFILING( if(accounted_time<0) fatal("Accounted time out of whack!\n");)) \ +  DO_IF_DEBUG( DO_IF_PROFILING( if((_tmp)->time_base<0) fatal("time base out of whack!\n");)) \    SWAP_OUT_TRACE(_tmp); \    } while(0)   
381:    thread_id=(_tmp)->thread_id;\    DO_IF_PROFILING( accounted_time=(_tmp)->accounted_time; ) \    DO_IF_PROFILING( time_base = (_tmp)->time_base + gethrtime(); ) \ +  DO_IF_DEBUG( DO_IF_PROFILING( if(accounted_time<0) fatal("Accounted time out of whack!\n");)) \ +  DO_IF_DEBUG( DO_IF_PROFILING( if(time_base<0) fatal("time base out of whack!\n");)) \    SWAP_IN_TRACE(_tmp); \    } while(0)