28 lines
388 B
C
Raw Normal View History

2019-02-02 11:30:40 +08:00
#ifndef MSG_H
#define MSG_H
2017-12-06 21:43:47 +08:00
typedef struct
{
unsigned int dwMsgId;
unsigned int dwParam1;
unsigned int dwParam2;
}MSG_INFO;
#define FIFO_BUFFER_LEN 1024
class c_fifo
{
public:
c_fifo();
2017-12-06 21:43:47 +08:00
int read(void* buf, int len);
int write(void* buf, int len);
private:
unsigned char m_buf[FIFO_BUFFER_LEN];
int m_head;
int m_tail;
void* m_read_sem;
void* m_write_mutex;
};
#endif