diff --git a/src/msg_queue.c b/src/msg_queue.c index ff94048..6d46c84 100644 --- a/src/msg_queue.c +++ b/src/msg_queue.c @@ -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; diff --git a/src/msg_queue.h b/src/msg_queue.h index 4b0ddc5..fd44f0f 100644 --- a/src/msg_queue.h +++ b/src/msg_queue.h @@ -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 */