|
|
| version 1.2, 2012/03/16 09:24:15 | version 1.6, 2020/12/10 23:07:04 |
|---|---|
| Line 1 | Line 1 |
| /** @file | /** @file |
| Parser: Mutex realization class. | Parser: Mutex realization class. |
| Copyright (c) 2001-2012 Art. Lebedev Studio (http://www.artlebedev.com) | Copyright (c) 2001-2017 Art. Lebedev Studio (http://www.artlebedev.com) |
| Author: Alexandr Petrosian <paf@design.ru> (http://paf.design.ru) | Author: Alexandr Petrosian <paf@design.ru> (http://paf.design.ru) |
| */ | */ |
| Line 13 Mutex global_mutex; | Line 13 Mutex global_mutex; |
| #ifdef WIN32 | #ifdef WIN32 |
| #define WINVER 0x0400 | |
| #include <windows.h> | #include <windows.h> |
| const bool parser_multithreaded=true; | |
| pa_thread_t pa_get_thread_id() { | pa_thread_t pa_get_thread_id() { |
| return GetCurrentThreadId(); | return GetCurrentThreadId(); |
| } | } |
| Line 40 void Mutex::release() { | Line 37 void Mutex::release() { |
| #else | #else |
| const bool parser_multithreaded=false; | |
| pa_thread_t pa_get_thread_id() { return 1; } | pa_thread_t pa_get_thread_id() { return 1; } |
| Mutex::Mutex() {} | Mutex::Mutex() {} |