diff --git a/src/threads.h b/src/threads.h index 85725ce4847256314ad7695200aea1394c6a720d..207bd1a6349b448353474b3d0e36438b635faeec 100644 --- a/src/threads.h +++ b/src/threads.h @@ -1,5 +1,5 @@ /* - * $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,8 +9,6 @@ #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,6 +20,12 @@ struct Pike_interpreter; #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,6 +345,9 @@ struct thread_state { THREAD_T id; struct mapping *thread_local; struct thread_state *hashlink, **backlink; +#ifdef PROFILING + long long time_base; +#endif /* PROFILING */ }; @@ -449,7 +456,9 @@ struct thread_state { 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,6 +630,14 @@ void th_farm(void (*fun)(void *), void *here); #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