Skip to content

Commit 8979120

Browse files
committed
dispatch: repair the context for the cooperative root queue
The dispatch object context for the cooperative root queue was not initialized which resulted in the pthread root queue being invalid when initializing the root queues. This corrects the default value for the root queue.
1 parent 100c055 commit 8979120

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/init.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -342,6 +342,7 @@ struct dispatch_queue_global_s _dispatch_root_queues[] = {
342342
#define _DISPATCH_COOPERATIVE_ROOT_QUEUE_ENTRY(n, flags, ...) \
343343
[_DISPATCH_ROOT_QUEUE_IDX(n, flags)] = { \
344344
.do_vtable = DISPATCH_VTABLE(queue_concurrent), \
345+
.do_ctxt = _dispatch_root_queue_ctxt(_DISPATCH_ROOT_QUEUE_IDX(n, flags)), \
345346
.dq_priority = flags | ((flags & DISPATCH_PRIORITY_FLAG_FALLBACK) ? \
346347
_dispatch_priority_make_fallback(DISPATCH_QOS_##n) : \
347348
_dispatch_priority_make(DISPATCH_QOS_##n, 0)), \

0 commit comments

Comments
 (0)