diff --git a/src/concurrent/msgq.c b/src/concurrent/msgq.c index e314921..25e5d88 100644 --- a/src/concurrent/msgq.c +++ b/src/concurrent/msgq.c @@ -28,7 +28,7 @@ static void msgq_cleanup(struct msgq* mq) void* msgq_begin_send(struct msgq* mq, int type, size_t payload_size) { pthread_mutex_lock(&mq->mx); - struct msgq_msg* msg = ralloc(&mq->rgn, sizeof(struct msgq_msg) + payload_size); + struct msgq_msg_list* msg = ralloc(&mq->rgn, sizeof(struct msgq_msg_list) + payload_size); msg->next = NULL; msg->type = type; if (mq->head == NULL) { diff --git a/src/concurrent/msgq.h b/src/concurrent/msgq.h index 1b54bc1..6226a29 100644 --- a/src/concurrent/msgq.h +++ b/src/concurrent/msgq.h @@ -3,18 +3,18 @@ #include "../util/region.h" #include -struct msgq_msg; +struct msgq_msg_list; struct msgq { struct rgn rgn; - struct msgq_msg* head; - struct msgq_msg* tail; + struct msgq_msg_list* head; + struct msgq_msg_list* tail; pthread_mutex_t mx; pthread_cond_t cv; }; -struct msgq_msg { - struct msgq_msg* next; +struct msgq_msg_list { + struct msgq_msg_list* next; int type; char payload[0]; };