--- parser3/src/targets/apache13/Attic/pa_threads.C 2001/10/31 11:23:39 1.2 +++ parser3/src/targets/apache13/Attic/pa_threads.C 2002/02/08 08:30:17 1.7 @@ -1,10 +1,10 @@ /** @file Parser: Mutex realization class. - Copyright (c) 2001 ArtLebedev Group (http://www.artlebedev.com) - Author: Alexander Petrosyan (http://design.ru/paf) + Copyright (c) 2001, 2002 ArtLebedev Group (http://www.artlebedev.com) + Author: Alexandr Petrosian (http://paf.design.ru) - $Id: pa_threads.C,v 1.2 2001/10/31 11:23:39 paf Exp $ + $Id: pa_threads.C,v 1.7 2002/02/08 08:30:17 paf Exp $ */ #include "pa_threads.h" @@ -18,6 +18,24 @@ Mutex global_mutex; const bool parser_multithreaded=true; +pa_thread_t pa_get_thread_id() { + return static_cast( +#ifdef WIN32 + GetThreadID() +#else +# ifdef to-do-PTHREADS + pthread_self() +# else +# ifdef to-do-SOLARIS_THREADS + thr_self() +# else +# error there must be some get_thread_id function +# endif +# endif +#endif + ); +} + Mutex::Mutex() : handle(reinterpret_cast(ap_create_mutex(0))) { } @@ -38,6 +56,8 @@ void Mutex::release() { const bool parser_multithreaded=false; +pa_thread_t pa_get_thread_id() { return 1; } + Mutex::Mutex() {} Mutex::~Mutex() {} void Mutex::acquire() {}