From edd35ae3af70075e0d59b6409f6d206c6c08d85b Mon Sep 17 00:00:00 2001 From: brain Date: Thu, 4 Sep 2008 10:06:59 +0000 Subject: 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 --- include/threadengines/threadengine_pthread.h | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'include/threadengines/threadengine_pthread.h') 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 -- cgit v1.2.3