--- parser3/src/include/pa_threads.h 2001/09/26 10:32:25 1.17 +++ parser3/src/include/pa_threads.h 2015/10/26 01:21:56 1.32 @@ -1,23 +1,29 @@ /** @file Parser: mutex & helpers decls. - Copyright (c) 2001 ArtLebedev Group (http://www.artlebedev.com) - Author: Alexander Petrosyan (http://design.ru/paf) - - $Id: pa_threads.h,v 1.17 2001/09/26 10:32:25 parser Exp $ + Copyright (c) 2001-2015 Art. Lebedev Studio (http://www.artlebedev.com) + Author: Alexandr Petrosian (http://paf.design.ru) */ #ifndef PA_THREADS_H #define PA_THREADS_H +#define IDENT_PA_THREADS_H "$Id: pa_threads.h,v 1.32 2015/10/26 01:21:56 moko Exp $" + #include "pa_config_includes.h" #include "pa_types.h" +/// thread ID type +typedef unsigned int pa_thread_t; + +/// get caller thread ID +pa_thread_t pa_get_thread_id(); + class AutoSYNCHRONIZED; /// simple semaphore object class Mutex { - friend AutoSYNCHRONIZED; + friend class AutoSYNCHRONIZED; private: uint handle; public: @@ -28,6 +34,7 @@ private: // for AutoSYNCHRONIZED void release(); }; +extern const bool parser_multithreaded; extern Mutex global_mutex; /**