Skip to content

Commit 3d973a6

Browse files
committed
Revise based on initial review feedback.
1 parent 8ddcbbd commit 3d973a6

File tree

3 files changed

+263
-285
lines changed

3 files changed

+263
-285
lines changed

src/queue.c

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,8 @@ struct dispatch_root_queue_context_s {
153153
#if HAVE_PTHREAD_WORKQUEUES
154154
qos_class_t dgq_qos;
155155
int dgq_wq_priority, dgq_wq_options;
156-
#if DISPATCH_USE_LEGACY_WORKQUEUE_FALLBACK || DISPATCH_USE_PTHREAD_POOL || HAVE_INTERNAL_PTHREAD_WORKQUEUE
156+
#if DISPATCH_USE_LEGACY_WORKQUEUE_FALLBACK || DISPATCH_USE_PTHREAD_POOL || \
157+
HAVE_INTERNAL_PTHREAD_WORKQUEUE
157158
pthread_workqueue_t dgq_kworkqueue;
158159
#endif
159160
#endif // HAVE_PTHREAD_WORKQUEUES
@@ -636,7 +637,8 @@ _dispatch_root_queues_init_workq(int *wq_supported)
636637
result = !r;
637638
}
638639
#endif // HAVE_PTHREAD_WORKQUEUE_SETDISPATCH_NP
639-
#if DISPATCH_USE_LEGACY_WORKQUEUE_FALLBACK || DISPATCH_USE_PTHREAD_POOL || HAVE_INTERNAL_PTHREAD_WORKQUEUE
640+
#if DISPATCH_USE_LEGACY_WORKQUEUE_FALLBACK || DISPATCH_USE_PTHREAD_POOL || \
641+
HAVE_INTERNAL_PTHREAD_WORKQUEUE
640642
if (!result) {
641643
#if DISPATCH_USE_LEGACY_WORKQUEUE_FALLBACK
642644
pthread_workqueue_attr_t pwq_attr;
@@ -667,8 +669,9 @@ _dispatch_root_queues_init_workq(int *wq_supported)
667669
#if HAVE_INTERNAL_PTHREAD_WORKQUEUE
668670
if (!disable_wq && qc->dgq_wq_priority != WORKQ_PRIO_INVALID) {
669671
int priority = qc->dgq_wq_priority;
670-
int overcommit = qc->dgq_wq_options & WORKQ_ADDTHREADS_OPTION_OVERCOMMIT;
671-
r = dispatch_workqueue_get_wq(&pwq, priority, overcommit);
672+
int overcommit =
673+
qc->dgq_wq_options & WORKQ_ADDTHREADS_OPTION_OVERCOMMIT;
674+
r = dispatch_workq_get_wq(&pwq, priority, overcommit);
672675
(void)dispatch_assume_zero(r);
673676
result = result || dispatch_assume(pwq);
674677
}
@@ -3985,7 +3988,7 @@ _dispatch_global_queue_poke_slow(dispatch_queue_t dq, unsigned int n)
39853988
#if HAVE_INTERNAL_PTHREAD_WORKQUEUE
39863989
if (qc->dgq_kworkqueue) {
39873990
do {
3988-
r = dispatch_workqueue_additem_np(qc->dgq_kworkqueue,
3991+
r = dispatch_workq_additem_np(qc->dgq_kworkqueue,
39893992
_dispatch_worker_thread4, dq);
39903993
(void)dispatch_assume_zero(r);
39913994
} while (--i);

0 commit comments

Comments
 (0)