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

Last change on this file since 1858 was 1273, checked in by tbretz, 23 years ago
*** empty log message ***
File size: 747 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
9class MsgQueue
10{
11private:
12 int fBreak;
13 int fStart;
14 int fStop;
15
16 int fMsg; // Message identifier
17 void *fMp; // Message Parameter
18 void *fSize; // Message Parameter Size
19 void *fRc; // Proc return code
20
21 pthread_t fThread;
22 pthread_mutex_t fMuxMsg;
23 pthread_cond_t fCondMsg;
24 pthread_mutex_t fMuxRc;
25 pthread_cond_t fCondRc;
26
27 static void *MapThread(void *arg);
28
29 void Thread();
30
31public:
32 MsgQueue();
33 virtual ~MsgQueue();
34
35 int Break() const { return fBreak; }
36
37 virtual void *Proc(int msg, void *mp1);
38
39 void *PostMsg(int msg, void *mp1, int size);
40};
41
42#endif
Note: See TracBrowser for help on using the repository browser.