1 /* +------------------------------------+
2 * | Inspire Internet Relay Chat Daemon |
3 * +------------------------------------+
5 * InspIRCd: (C) 2002-2008 InspIRCd Development Team
6 * See: http://www.inspircd.org/wiki/index.php/Credits
8 * This program is free but copyrighted software; see
9 * the file COPYING for details.
11 * ---------------------------------------------------
14 #ifndef __THREADENGINE_PTHREAD__
15 #define __THREADENGINE_PTHREAD__
18 #include "inspircd_config.h"
20 #include "threadengine.h"
24 class CoreExport PThreadEngine : public ThreadEngine
28 PThreadEngine(InspIRCd* Instance);
30 virtual ~PThreadEngine();
32 bool Mutex(bool enable);
36 static void* Entry(void* parameter);
38 void Create(Thread* thread_to_init);
40 void FreeThread(Thread* thread);
42 const std::string GetName()
44 return "posix-thread";
48 class CoreExport ThreadEngineFactory : public classbase
51 ThreadEngine* Create(InspIRCd* ServerInstance)
53 return new PThreadEngine(ServerInstance);