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

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