Branch: Tag:

2000-07-07

2000-07-07 13:19:48 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Now temporarily disables the fp macro since it conflicts with Solaris's <pthread.h>.
Added time_base to the thread_state struct to support PROFILING.

Rev: src/threads.h:1.96

1:   /* -  * $Id: threads.h,v 1.95 2000/07/07 00:21:48 hubbe Exp $ +  * $Id: threads.h,v 1.96 2000/07/07 13:19:48 grubba Exp $    */   #ifndef THREADS_H   #define THREADS_H
9:   #include "error.h"   #include "interpret.h"    - struct Pike_interpreter; -  +    /* Needed for the sigset_t typedef, which is needed for    * the pthread_sigsetmask() prototype on Solaris 2.x.    */
22: Inside #if defined(PIKE_THREADS)
  #endif /* HAVE_SYS_TYPES_H */   #ifdef PIKE_THREADS    + /* The fp macro conflicts with Solaris's <pthread.h>. */ + #ifdef fp + #undef fp + #define FRAMEPOINTER_WAS_DEFINED + #endif /* fp */ +    /*    * Decide which type of threads to use    *
341:    THREAD_T id;    struct mapping *thread_local;    struct thread_state *hashlink, **backlink; + #ifdef PROFILING +  long long time_base; + #endif /* PROFILING */   };      
449:    DO_IF_DEBUG({ \    extern int Pike_in_gc; \    if(thread_for_id(th_self()) != Pike_interpreter.thread_id) \ -  fatal("thread_for_id() (or Pike_interpreter.thread_id) failed! %p != %p\n",thread_for_id(th_self()),Pike_interpreter.thread_id); \ +  fatal("thread_for_id() (or Pike_interpreter.thread_id) failed!" \ +  " %p != %p\n", \ +  thread_for_id(th_self()), Pike_interpreter.thread_id); \    if (Pike_in_gc > 50 && Pike_in_gc < 300) \    fatal("Threads allowed during garbage collection.\n"); \    }) \
621:   #define init_threads_disable(X)   #define exit_threads_disable(X)    +  + /* Restore the fp macro. */ + #ifdef FRAMEPOINTER_WAS_DEFINED + #define fp Pike_fp + #undef FRAMEPOINTER_WAS_DEFINED + #endif /* FRAMEPOINTER_WAS_DEFINED */ +  +    #endif /* PIKE_THREADS */      #ifndef CHECK_INTERPRETER_LOCK