source: trunk/MagicSoft/Cosy/base/msgqueue.h@ 8238

Last change on this file since 8238 was 2518, checked in by tbretz, 21 years ago
*** empty log message ***
File size: 803 bytes
Line 
1#ifndef MSGQUEUE_H
2#define MSGQUEUE_H
3
4#include "threads.h"
5
6#define WM_NULL 0x0000
7#define WM_QUIT 0xffff
8
9#ifndef ROOT_TMutex
10#include <TMutex.h>
11#endif
12
13class MsgQueue
14{
15private:
16 int fBreak;
17 int fStart;
18 int fStop;
19
20 int fMsg; // Message identifier
21 void *fMp; // Message Parameter
22 void *fSize; // Message Parameter Size
23 void *fRc; // Proc return code
24
25 pthread_t fThread;
26 TMutex fMuxMsg;
27
28 static void *MapThread(void *arg);
29
30 void Thread();
31
32public:
33 MsgQueue();
34 virtual ~MsgQueue();
35
36 int Break() const { return fBreak; }
37
38 virtual void *Proc(int msg, void *mp1);
39 void *Proc(int msg) { return Proc(msg, 0); }
40
41 void *PostMsg(int msg, void *mp1, int size);
42 void *PostMsg(int msg) { return PostMsg(msg, 0, 0); }
43};
44
45#endif
Note: See TracBrowser for help on using the repository browser.