Skip to content

Commit 9d375b9

Browse files
committed
fix signal queue issue
1 parent 74ddc5a commit 9d375b9

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/PikaVM.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -327,14 +327,14 @@ PIKA_RES __eventListener_popEvent(PikaEventListener** lisener_p,
327327
if (NULL == cq) {
328328
return PIKA_RES_ERR_SIGNAL_EVENT_EMPTY;
329329
}
330-
*id = cq->id[g_PikaVMState.cq.head];
330+
*id = cq->id[cq->head];
331331
if (cq == &g_PikaVMState.cq) {
332-
*data = cq->data[g_PikaVMState.cq.head].arg;
332+
*data = cq->data[cq->head].arg;
333333
} else {
334-
*signal = cq->data[g_PikaVMState.cq.head].signal;
334+
*signal = cq->data[cq->head].signal;
335335
*data = NULL;
336336
}
337-
*lisener_p = cq->listener[g_PikaVMState.cq.head];
337+
*lisener_p = cq->listener[cq->head];
338338
*head = cq->head;
339339
cq->head = (cq->head + 1) % PIKA_EVENT_LIST_SIZE;
340340
return PIKA_RES_OK;

0 commit comments

Comments
 (0)