Skip to content

Commit 8f09c6b

Browse files
committed
Revise based on initial review feedback.
1 parent d1e4417 commit 8f09c6b

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
@@ -160,7 +160,8 @@ struct dispatch_root_queue_context_s {
160160
#if HAVE_PTHREAD_WORKQUEUES
161161
qos_class_t dgq_qos;
162162
int dgq_wq_priority, dgq_wq_options;
163-
#if DISPATCH_USE_LEGACY_WORKQUEUE_FALLBACK || DISPATCH_USE_PTHREAD_POOL || HAVE_INTERNAL_PTHREAD_WORKQUEUE
163+
#if DISPATCH_USE_LEGACY_WORKQUEUE_FALLBACK || DISPATCH_USE_PTHREAD_POOL || \
164+
HAVE_INTERNAL_PTHREAD_WORKQUEUE
164165
pthread_workqueue_t dgq_kworkqueue;
165166
#endif
166167
#endif // HAVE_PTHREAD_WORKQUEUES
@@ -720,7 +721,8 @@ _dispatch_root_queues_init_workq(int *wq_supported)
720721
result = !r;
721722
}
722723
#endif // HAVE_PTHREAD_WORKQUEUE_SETDISPATCH_NP
723-
#if DISPATCH_USE_LEGACY_WORKQUEUE_FALLBACK || DISPATCH_USE_PTHREAD_POOL || HAVE_INTERNAL_PTHREAD_WORKQUEUE
724+
#if DISPATCH_USE_LEGACY_WORKQUEUE_FALLBACK || DISPATCH_USE_PTHREAD_POOL || \
725+
HAVE_INTERNAL_PTHREAD_WORKQUEUE
724726
if (!result) {
725727
#if DISPATCH_USE_LEGACY_WORKQUEUE_FALLBACK
726728
pthread_workqueue_attr_t pwq_attr;
@@ -751,8 +753,9 @@ _dispatch_root_queues_init_workq(int *wq_supported)
751753
#if HAVE_INTERNAL_PTHREAD_WORKQUEUE
752754
if (!disable_wq && qc->dgq_wq_priority != WORKQ_PRIO_INVALID) {
753755
int priority = qc->dgq_wq_priority;
754-
int overcommit = qc->dgq_wq_options & WORKQ_ADDTHREADS_OPTION_OVERCOMMIT;
755-
r = dispatch_workqueue_get_wq(&pwq, priority, overcommit);
756+
int overcommit =
757+
qc->dgq_wq_options & WORKQ_ADDTHREADS_OPTION_OVERCOMMIT;
758+
r = dispatch_workq_get_wq(&pwq, priority, overcommit);
756759
(void)dispatch_assume_zero(r);
757760
result = result || dispatch_assume(pwq);
758761
}
@@ -4288,7 +4291,7 @@ _dispatch_global_queue_poke_slow(dispatch_queue_t dq, unsigned int n)
42884291
#if HAVE_INTERNAL_PTHREAD_WORKQUEUE
42894292
if (qc->dgq_kworkqueue) {
42904293
do {
4291-
r = dispatch_workqueue_additem_np(qc->dgq_kworkqueue,
4294+
r = dispatch_workq_additem_np(qc->dgq_kworkqueue,
42924295
_dispatch_worker_thread4, dq);
42934296
(void)dispatch_assume_zero(r);
42944297
} while (--i);

0 commit comments

Comments
 (0)