summaryrefslogtreecommitdiff
path: root/include/threadengines
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2008-09-04 10:06:59 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2008-09-04 10:06:59 +0000
commitedd35ae3af70075e0d59b6409f6d206c6c08d85b (patch)
tree624f9e24f56cc335537f2200c0f8e05723813f5d /include/threadengines
parent2cf32b03206531223d847881d58b452b81d92b77 (diff)
ability to create mutexes (rather than just having one system wide mutex) in the threadengines, allows for migration of m_mysql etc.
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@10381 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'include/threadengines')
-rw-r--r--include/threadengines/threadengine_pthread.h19
-rw-r--r--include/threadengines/threadengine_win32.h19
2 files changed, 38 insertions, 0 deletions
diff --git a/include/threadengines/threadengine_pthread.h b/include/threadengines/threadengine_pthread.h
index 602484b4e..07bda4598 100644
--- a/include/threadengines/threadengine_pthread.h
+++ b/include/threadengines/threadengine_pthread.h
@@ -54,4 +54,23 @@ class CoreExport ThreadEngineFactory : public classbase
}
};
+class CoreExport PosixMutex : public Mutex
+{
+ private:
+ pthread_mutex_t putex
+ public:
+ PosixMutex(InspIRCd* Instance);
+ virtual void Enable(bool enable);
+ ~PosixMutex();
+};
+
+class CoreExport MutexEngine : public Extensible
+{
+ protected:
+ InspIRCd* ServerInstance;
+ public:
+ virtual MutexEngine(InspIRCd* Instance);
+ Mutex* CreateMutex();
+};
+
#endif
diff --git a/include/threadengines/threadengine_win32.h b/include/threadengines/threadengine_win32.h
index 39e6ae88d..e19f24ca0 100644
--- a/include/threadengines/threadengine_win32.h
+++ b/include/threadengines/threadengine_win32.h
@@ -53,5 +53,24 @@ class CoreExport ThreadEngineFactory : public classbase
}
};
+class CoreExport Win32Mutex : public Mutex
+{
+ private:
+ CRITICAL_SECTION wutex;
+ public:
+ Win32Mutex(InspIRCd* Instance);
+ virtual void Enable(bool enable);
+ ~Win32Mutex();
+};
+
+class CoreExport MutexEngine : public Extensible
+{
+ protected:
+ InspIRCd* ServerInstance;
+ public:
+ MutexEngine(InspIRCd* Instance);
+ virtual Mutex* CreateMutex();
+};
+
#endif