]> git.netwichtig.de Git - user/henk/code/inspircd.git/blob - include/threadengines/threadengine_pthread.h
Add threading engine stuff. Docs to follow, untested and not used anywhere yet
[user/henk/code/inspircd.git] / include / threadengines / threadengine_pthread.h
1 /*       +------------------------------------+
2  *       | Inspire Internet Relay Chat Daemon |
3  *       +------------------------------------+
4  *
5  *  InspIRCd: (C) 2002-2008 InspIRCd Development Team
6  * See: http://www.inspircd.org/wiki/index.php/Credits
7  *
8  * This program is free but copyrighted software; see
9  *            the file COPYING for details.
10  *
11  * ---------------------------------------------------
12  */
13
14 #ifndef __THREADENGINE_PTHREAD__
15 #define __THREADENGINE_PTHREAD__
16
17 #include <pthread.h>
18 #include "inspircd_config.h"
19 #include "base.h"
20 #include "threadengine.h"
21
22 class InspIRCd;
23
24 class CoreExport PThreadEngine : public ThreadEngine
25 {
26  private:
27
28          pthread_t MyPThread;
29
30  public:
31
32         PThreadEngine(InspIRCd* Instance);
33
34         virtual ~PThreadEngine();
35
36         bool Mutex(bool enable);
37
38         void Run();
39
40         static void* Entry(void* parameter);
41
42         void Create(Thread* thread_to_init);
43 };
44
45 #endif