]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - include/threadengines/threadengine_win32.h
Revert r11241 due to crashiness when rehashing from IRC.
[user/henk/code/inspircd.git] / include / threadengines / threadengine_win32.h
index 696948d19b3717ab4db4f759d9d1710ee2dfe32b..d6d98b011a14aae8306d7a52354fd74af9f40b24 100644 (file)
@@ -2,8 +2,8 @@
  *       | Inspire Internet Relay Chat Daemon |
  *       +------------------------------------+
  *
- *  InspIRCd: (C) 2002-2008 InspIRCd Development Team
- * See: http://www.inspircd.org/wiki/index.php/Credits
+ *  InspIRCd: (C) 2002-2009 InspIRCd Development Team
+ * See: http://wiki.inspircd.org/Credits
  *
  * This program is free but copyrighted software; see
  *            the file COPYING for details.
  * ---------------------------------------------------
  */
 
-#ifndef __THREADENGINE_PTHREAD__
-#define __THREADENGINE_PTHREAD__
+#ifndef __THREADENGINE_WIN32THREAD__
+#define __THREADENGINE_WIN32THREAD__
 
-#include <pthread.h>
 #include "inspircd_config.h"
 #include "base.h"
 #include "threadengine.h"
@@ -23,14 +22,16 @@ class InspIRCd;
 
 class CoreExport Win32ThreadEngine : public ThreadEngine
 {
+ protected:
+
+       bool Mutex(bool enable);
+
  public:
 
        Win32ThreadEngine(InspIRCd* Instance);
 
        virtual ~Win32ThreadEngine();
 
-       bool Mutex(bool enable);
-
        void Run();
 
        static DWORD WINAPI Entry(void* parameter);
@@ -45,7 +46,7 @@ class CoreExport Win32ThreadEngine : public ThreadEngine
        }
 };
 
-class ThreadEngineFactory : public classbase
+class CoreExport ThreadEngineFactory : public classbase
 {
  public:
        ThreadEngine* Create(InspIRCd* ServerInstance)
@@ -54,5 +55,24 @@ class ThreadEngineFactory : public classbase
        }
 };
 
+class CoreExport Win32Mutex : public Mutex
+{
+ private:
+       CRITICAL_SECTION wutex;
+ public:
+       Win32Mutex(InspIRCd* Instance);
+       virtual void Enable(bool enable);
+       ~Win32Mutex();
+};
+
+class CoreExport MutexFactory : public Extensible
+{
+ protected:
+       InspIRCd* ServerInstance;
+ public:
+       MutexFactory(InspIRCd* Instance);
+       virtual Mutex* CreateMutex();
+};
+
 #endif