Index: src/Thread.cpp |
diff --git a/src/Thread.cpp b/src/Thread.cpp |
index 8e47c4516487c22a70b3d249b14f0af224b21a92..0968de470c9e732a68b6298ab4e2a6aaec5c153b 100644 |
--- a/src/Thread.cpp |
+++ b/src/Thread.cpp |
@@ -30,84 +30,4 @@ void AdblockPlus::Sleep(int millis) |
#else |
usleep(millis * 1000); |
#endif |
-} |
- |
-Mutex::Mutex() |
-{ |
-#ifdef WIN32 |
- InitializeCriticalSection(&nativeMutex); |
-#else |
- pthread_mutex_init(&nativeMutex, 0); |
-#endif |
-} |
- |
-Mutex::~Mutex() |
-{ |
-#ifdef WIN32 |
- DeleteCriticalSection(&nativeMutex); |
-#else |
- pthread_mutex_destroy(&nativeMutex); |
-#endif |
-} |
- |
-void Mutex::Lock() |
-{ |
-#ifdef WIN32 |
- EnterCriticalSection(&nativeMutex); |
-#else |
- pthread_mutex_lock(&nativeMutex); |
-#endif |
-} |
- |
-void Mutex::Unlock() |
-{ |
-#ifdef WIN32 |
- LeaveCriticalSection(&nativeMutex); |
-#else |
- pthread_mutex_unlock(&nativeMutex); |
-#endif |
-} |
- |
-Lock::Lock(Mutex& mutex) : mutex(mutex) |
-{ |
- mutex.Lock(); |
-} |
- |
-Lock::~Lock() |
-{ |
- mutex.Unlock(); |
-} |
- |
-Thread::Thread(bool deleteSelfOnFinish) |
- : m_deleteSelfOnFinish(deleteSelfOnFinish) |
-{ |
-} |
- |
-Thread::~Thread() |
-{ |
-} |
- |
-void Thread::Start() |
-{ |
-#ifdef WIN32 |
- nativeThread = CreateThread(0, 0, (LPTHREAD_START_ROUTINE)&CallRun, this, 0, 0); |
-#else |
- pthread_create(&nativeThread, 0, (void* (*)(void*)) &CallRun, this); |
-#endif |
-} |
- |
-void Thread::Join() |
-{ |
-#ifdef WIN32 |
- WaitForSingleObject(nativeThread, INFINITE); |
-#else |
- pthread_join(nativeThread, 0); |
-#endif |
-} |
- |
-void Thread::CallRun(Thread* thread) |
-{ |
- thread->Run(); |
- if (thread->m_deleteSelfOnFinish) |
- delete thread; |
-} |
+} |