OLD | NEW |
1 /* | 1 /* |
2 * This file is part of Adblock Plus <https://adblockplus.org/>, | 2 * This file is part of Adblock Plus <https://adblockplus.org/>, |
3 * Copyright (C) 2006-2017 eyeo GmbH | 3 * Copyright (C) 2006-2017 eyeo GmbH |
4 * | 4 * |
5 * Adblock Plus is free software: you can redistribute it and/or modify | 5 * Adblock Plus is free software: you can redistribute it and/or modify |
6 * it under the terms of the GNU General Public License version 3 as | 6 * it under the terms of the GNU General Public License version 3 as |
7 * published by the Free Software Foundation. | 7 * published by the Free Software Foundation. |
8 * | 8 * |
9 * Adblock Plus is distributed in the hope that it will be useful, | 9 * Adblock Plus is distributed in the hope that it will be useful, |
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
12 * GNU General Public License for more details. | 12 * GNU General Public License for more details. |
13 * | 13 * |
14 * You should have received a copy of the GNU General Public License | 14 * You should have received a copy of the GNU General Public License |
15 * along with Adblock Plus. If not, see <http://www.gnu.org/licenses/>. | 15 * along with Adblock Plus. If not, see <http://www.gnu.org/licenses/>. |
16 */ | 16 */ |
17 | 17 |
18 #ifndef ADBLOCKPLUS_THREAD_H | 18 #ifndef ADBLOCKPLUS_THREAD_H |
19 #define ADBLOCKPLUS_THREAD_H | 19 #define ADBLOCKPLUS_THREAD_H |
20 | 20 |
21 #ifdef WIN32 | 21 #ifdef WIN32 |
22 #include <windows.h> | 22 #include <windows.h> |
23 #else | 23 #else |
24 #include <pthread.h> | 24 #include <pthread.h> |
25 #endif | 25 #endif |
26 | 26 |
27 namespace AdblockPlus | 27 namespace AdblockPlus |
28 { | 28 { |
29 void Sleep(const int millis); | 29 void Sleep(int millis); |
30 | 30 |
31 class Mutex | 31 class Mutex |
32 { | 32 { |
33 public: | 33 public: |
34 #ifdef WIN32 | 34 #ifdef WIN32 |
35 CRITICAL_SECTION nativeMutex; | 35 CRITICAL_SECTION nativeMutex; |
36 #else | 36 #else |
37 pthread_mutex_t nativeMutex; | 37 pthread_mutex_t nativeMutex; |
38 #endif | 38 #endif |
39 | 39 |
(...skipping 27 matching lines...) Expand all Loading... |
67 #ifdef WIN32 | 67 #ifdef WIN32 |
68 HANDLE nativeThread; | 68 HANDLE nativeThread; |
69 #else | 69 #else |
70 pthread_t nativeThread; | 70 pthread_t nativeThread; |
71 #endif | 71 #endif |
72 bool m_deleteSelfOnFinish; | 72 bool m_deleteSelfOnFinish; |
73 }; | 73 }; |
74 } | 74 } |
75 | 75 |
76 #endif | 76 #endif |
OLD | NEW |