--- parser3/src/include/pa_threads.h 2001/05/17 10:42:56 1.15 +++ parser3/src/include/pa_threads.h 2001/11/05 11:46:26 1.20 @@ -2,10 +2,9 @@ Parser: mutex & helpers decls. Copyright (c) 2001 ArtLebedev Group (http://www.artlebedev.com) + Author: Alexander Petrosyan (http://paf.design.ru) - Author: Alexander Petrosyan (http://design.ru/paf) - - $Id: pa_threads.h,v 1.15 2001/05/17 10:42:56 parser Exp $ + $Id: pa_threads.h,v 1.20 2001/11/05 11:46:26 paf Exp $ */ #ifndef PA_THREADS_H @@ -14,14 +13,11 @@ #include "pa_config_includes.h" #include "pa_types.h" - -#ifdef MULTITHREAD - class AutoSYNCHRONIZED; /// simple semaphore object class Mutex { - friend AutoSYNCHRONIZED; + friend class AutoSYNCHRONIZED; private: uint handle; public: @@ -32,6 +28,7 @@ private: // for AutoSYNCHRONIZED void release(); }; +extern const bool parser_multithreaded; extern Mutex global_mutex; /** @@ -56,11 +53,6 @@ public: WARNING: don't use THROW or PTHROW with such thread safety mechanizm - longjmp would leave global_mutex acquired, which is wrong! */ -# define SYNCHRONIZED AutoSYNCHRONIZED autoSYNCHRONIZED -#else - // not MULTITHREAD-ed, do nothing -# define SYNCHRONIZED -#endif - +#define SYNCHRONIZED AutoSYNCHRONIZED autoSYNCHRONIZED #endif