[async] rename msgq_msg => msgq_msg_list

This commit is contained in:
Milo Turner 2020-02-20 13:03:51 -05:00
parent 7df0ee7527
commit 1dd6d858c2
2 changed files with 6 additions and 6 deletions

View File

@ -28,7 +28,7 @@ static void msgq_cleanup(struct msgq* mq)
void* msgq_begin_send(struct msgq* mq, int type, size_t payload_size) void* msgq_begin_send(struct msgq* mq, int type, size_t payload_size)
{ {
pthread_mutex_lock(&mq->mx); 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->next = NULL;
msg->type = type; msg->type = type;
if (mq->head == NULL) { if (mq->head == NULL) {

View File

@ -3,18 +3,18 @@
#include "../util/region.h" #include "../util/region.h"
#include <pthread.h> #include <pthread.h>
struct msgq_msg; struct msgq_msg_list;
struct msgq { struct msgq {
struct rgn rgn; struct rgn rgn;
struct msgq_msg* head; struct msgq_msg_list* head;
struct msgq_msg* tail; struct msgq_msg_list* tail;
pthread_mutex_t mx; pthread_mutex_t mx;
pthread_cond_t cv; pthread_cond_t cv;
}; };
struct msgq_msg { struct msgq_msg_list {
struct msgq_msg* next; struct msgq_msg_list* next;
int type; int type;
char payload[0]; char payload[0];
}; };