[async] rename msgq.rgn to msgq.msg_rgn
This commit is contained in:
parent
26e66d9f61
commit
3936c26feb
|
@ -6,7 +6,7 @@ static void msgq_cleanup(struct msgq* mq);
|
|||
struct msgq* msgq_new(struct rgn* init_rgn)
|
||||
{
|
||||
struct msgq* mq = ralloc_typed(init_rgn, struct msgq, 1);
|
||||
mq->rgn = rgn_new(init_rgn, MEDIUM);
|
||||
mq->msg_rgn = rgn_new(init_rgn, SMALL);
|
||||
mq->head = mq->tail = NULL;
|
||||
pthread_mutex_init(&mq->mx, NULL);
|
||||
pthread_cond_init(&mq->cv, NULL);
|
||||
|
@ -26,7 +26,8 @@ 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_list* msg = ralloc(mq->rgn, sizeof(struct msgq_msg_list) + payload_size);
|
||||
struct msgq_msg_list* msg =
|
||||
ralloc(mq->msg_rgn, sizeof(struct msgq_msg_list) + payload_size);
|
||||
msg->next = NULL;
|
||||
msg->type = type;
|
||||
if (mq->head == NULL) {
|
||||
|
@ -76,6 +77,6 @@ void* msgq_recv1(struct msgq* mq, int* out_type)
|
|||
void msgq_end_recv(struct msgq* mq)
|
||||
{
|
||||
mq->head = mq->tail = NULL;
|
||||
rgn_clear(mq->rgn);
|
||||
rgn_clear(mq->msg_rgn);
|
||||
pthread_mutex_unlock(&mq->mx);
|
||||
}
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
struct msgq_msg_list;
|
||||
|
||||
struct msgq {
|
||||
struct rgn* rgn;
|
||||
struct rgn* msg_rgn;
|
||||
struct msgq_msg_list* head;
|
||||
struct msgq_msg_list* tail;
|
||||
pthread_mutex_t mx;
|
||||
|
|
|
@ -37,7 +37,7 @@ struct ax_window* ax__window_builder_finish(
|
|||
struct ax_msg_make_window* m =
|
||||
msgq_begin_send_typed(req_window_mq, ax_msg_make_window);
|
||||
m->dst_win = win;
|
||||
m->title = rstrdup(req_window_mq->rgn, winb->title);
|
||||
m->title = rstrdup(req_window_mq->msg_rgn, winb->title);
|
||||
m->width = winb->w;
|
||||
m->height = winb->h;
|
||||
m->flags = winb->flags;
|
||||
|
|
Loading…
Reference in New Issue