diff options
author | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2008-02-22 15:33:32 +0000 |
---|---|---|
committer | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2008-02-22 15:33:32 +0000 |
commit | 5942eeb7edad7f01b3ab80378ab95ee5894f6bbf (patch) | |
tree | a8de1fb6179d9cceb08a52a4eebf22754235f11d /src/threadengines | |
parent | cc185ac484f4dcf21912e7d36b8c50a056d7dce2 (diff) |
Add mutex wrappers
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8995 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/threadengines')
-rw-r--r-- | src/threadengines/threadengine_win32.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/threadengines/threadengine_win32.cpp b/src/threadengines/threadengine_win32.cpp index e426fe373..792445b3e 100644 --- a/src/threadengines/threadengine_win32.cpp +++ b/src/threadengines/threadengine_win32.cpp @@ -22,18 +22,21 @@ Win32ThreadEngine::Win32ThreadEngine(InspIRCd* Instance) : ThreadEngine(Instance void Win32ThreadEngine::Create(Thread* thread_to_init) { + Mutex(true); HANDLE* MyThread = new HANDLE; DWORD ThreadId = 0; if (!(*MyThread = CreateThread(NULL,0,Win32ThreadEngine::Entry,this,0,&ThreadId))) { delete MyThread; + Mutex(false); throw CoreException(std::string("Unable to reate new Win32ThreadEngine: ") + dlerror()); } NewThread = thread_to_init; NewThread->Creator = this; NewThread->Extend("winthread", MyThread); + Mutex(false); } Win32ThreadEngine::~Win32ThreadEngine() |