--- parser3/src/targets/isapi/Attic/pa_threads.C 2002/02/08 07:27:51 1.7 +++ parser3/src/targets/isapi/Attic/pa_threads.C 2003/01/31 12:34:41 1.13.2.1 @@ -1,35 +1,36 @@ /** @file Parser: zero Mutex realization class. - Copyright (c) 2001, 2002 ArtLebedev Group (http://www.artlebedev.com) - Author: Alexander Petrosyan (http://paf.design.ru) - - $Id: pa_threads.C,v 1.7 2002/02/08 07:27:51 paf Exp $ + Copyright (c) 2001-2003 ArtLebedev Group (http://www.artlebedev.com) + Author: Alexandr Petrosian (http://paf.design.ru) */ +static const char* IDENT_THREADS_C="$Date: 2003/01/31 12:34:41 $"; + #include "pa_threads.h" -/// @test really? +#include + const bool parser_multithreaded=true; pa_thread_t pa_get_thread_id() { - return GetThreadID(); + return GetCurrentThreadId(); } Mutex global_mutex; Mutex::Mutex() : - handle(static_cast(CreateMutex(NULL, FALSE, 0))) { + handle(reinterpret_cast(CreateMutex(NULL, FALSE, 0))) { } Mutex::~Mutex() { - CloseHandle(static_cast(handle)); + CloseHandle(reinterpret_cast(handle)); } void Mutex::acquire() { - WaitForSingleObject(static_cast(handle), INFINITE); + WaitForSingleObject(reinterpret_cast(handle), INFINITE); } void Mutex::release() { - ReleaseMutex(static_cast(handle)); + ReleaseMutex(reinterpret_cast(handle)); }