mirror of
https://github.com/cloudwu/skynet.git
synced 2026-07-24 20:23:06 +00:00
Merge branch 'master' into dev
This commit is contained in:
@@ -88,6 +88,10 @@ skynet_globalmq_pop() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
struct message_queue * mq = q->queue[head_ptr];
|
struct message_queue * mq = q->queue[head_ptr];
|
||||||
|
if (mq == NULL) {
|
||||||
|
// globalmq push not complete
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
if (!__sync_bool_compare_and_swap(&q->head, head, head+1)) {
|
if (!__sync_bool_compare_and_swap(&q->head, head, head+1)) {
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user