2019-12-01 01:02:08 -07:00
|
|
|
#ifndef __MSG_QUEUE_H_INCLUDED
|
|
|
|
#define __MSG_QUEUE_H_INCLUDED
|
|
|
|
|
|
|
|
#include "wintype.h"
|
|
|
|
#include "msg.h"
|
|
|
|
|
|
|
|
typedef struct tagMSG_QUEUE {
|
|
|
|
struct tagMSG_QUEUE *next;
|
|
|
|
PMSG startbound;
|
|
|
|
PMSG endbound;
|
|
|
|
PMSG head;
|
|
|
|
PMSG tail;
|
2019-12-05 18:21:37 -07:00
|
|
|
UINT32 nentries;
|
2019-12-01 01:02:08 -07:00
|
|
|
pthread_mutex_t mutex;
|
|
|
|
MSG messagestore[0];
|
|
|
|
} MSG_QUEUE, *PMSG_QUEUE;
|
|
|
|
|
|
|
|
#define PEEK_REMOVE 0x0001
|
|
|
|
#define PEEK_NOREMOVE 0x0000
|
|
|
|
|
2019-12-05 18:21:37 -07:00
|
|
|
extern PMSG_QUEUE Mq_alloc(UINT32 nentries);
|
2019-12-01 15:43:05 -07:00
|
|
|
extern void Mq_destroy(PMSG_QUEUE queue);
|
2019-12-05 18:21:37 -07:00
|
|
|
extern void Mq_post(PMSG_QUEUE queue, HANDLE target, UINT32 message, const UINT_PTR *attrs, int nattrs);
|
|
|
|
extern void Mq_post1(PMSG_QUEUE queue, HANDLE target, UINT32 message, UINT_PTR attr1);
|
|
|
|
extern BOOL Mq_peek(PMSG_QUEUE queue, PMSG msg, UINT32 flags);
|
2019-12-01 01:02:08 -07:00
|
|
|
|
|
|
|
#endif /* __MSG_QUEUE_H_INCLUDED */
|