now reflect volatile into the msg_queue definitions

This commit is contained in:
Amy G. Bowersox 2019-12-01 01:31:13 -07:00
parent 1bf4e3397e
commit 9588d1e94b
2 changed files with 8 additions and 7 deletions

View File

@ -28,7 +28,7 @@ void MqDestroy(PMSG_QUEUE queue)
free(queue);
}
static void post_internal(PMSG_QUEUE queue, PMSG msg)
static void post_internal(MSG_QUEUE volatile *queue, PMSG msg)
{
PMSG nexttail;
@ -46,7 +46,7 @@ static void post_internal(PMSG_QUEUE queue, PMSG msg)
pthread_mutex_unlock(&(queue->mutex));
}
void MqPost(PMSG_QUEUE queue, uintptr_t target, unsigned message, const uintptr_t *attrs, int nattrs)
void MqPost(MSG_QUEUE volatile *queue, uintptr_t target, unsigned message, const uintptr_t *attrs, int nattrs)
{
MSG tmpmsg;
@ -61,7 +61,7 @@ void MqPost(PMSG_QUEUE queue, uintptr_t target, unsigned message, const uintptr_
post_internal(queue, &tmpmsg);
}
void MqPost1(PMSG_QUEUE queue, uintptr_t target, unsigned message, uintptr_t attr1)
void MqPost1(MSG_QUEUE volatile *queue, uintptr_t target, unsigned message, uintptr_t attr1)
{
MSG tmpmsg;
@ -73,7 +73,7 @@ void MqPost1(PMSG_QUEUE queue, uintptr_t target, unsigned message, uintptr_t att
post_internal(queue, &tmpmsg);
}
int MqPeek(PMSG_QUEUE queue, PMSG msg, unsigned flags)
int MqPeek(MSG_QUEUE volatile *queue, PMSG msg, unsigned flags)
{
int rc = 0;
PMSG nexthead;

View File

@ -20,8 +20,9 @@ typedef struct tagMSG_QUEUE {
extern PMSG_QUEUE MqAlloc(int nentries);
extern void MqDestroy(PMSG_QUEUE queue);
extern void MqPost(PMSG_QUEUE queue, uintptr_t target, unsigned message, const uintptr_t *attrs, int nattrs);
extern void MqPost1(PMSG_QUEUE queue, uintptr_t target, unsigned message, uintptr_t attr1);
extern int MqPeek(PMSG_QUEUE queue, PMSG msg, unsigned flags);
extern void MqPost(MSG_QUEUE volatile *queue, uintptr_t target, unsigned message, const uintptr_t *attrs,
int nattrs);
extern void MqPost1(MSG_QUEUE volatile *queue, uintptr_t target, unsigned message, uintptr_t attr1);
extern int MqPeek(MSG_QUEUE volatile *queue, PMSG msg, unsigned flags);
#endif /* __MSG_QUEUE_H_INCLUDED */