Skip to content

Commit da47140

Browse files
committed
style, whitespace
Signed-off-by: Daniel A. Steffen <dsteffen@apple.com>
1 parent 146720c commit da47140

File tree

9 files changed

+20
-22
lines changed

9 files changed

+20
-22
lines changed

private/voucher_private.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -427,7 +427,7 @@ OS_VOUCHER_EXPORT OS_OBJECT_RETURNS_RETAINED OS_WARN_RESULT OS_NOTHROW
427427
voucher_t
428428
voucher_create_with_mach_msg(mach_msg_header_t *msg);
429429

430-
#endif
430+
#endif // __APPLE__
431431
__END_DECLS
432432

433433
#endif // __OS_VOUCHER_PRIVATE__

src/init.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -352,7 +352,7 @@ DISPATCH_VTABLE_INSTANCE(mach_msg,
352352
.do_invoke = _dispatch_mach_msg_invoke,
353353
.do_debug = _dispatch_mach_msg_debug,
354354
);
355-
#endif
355+
#endif // HAVE_MACH
356356

357357
#if !USE_OBJC
358358
DISPATCH_VTABLE_INSTANCE(data,
@@ -810,7 +810,7 @@ _dispatch_client_callout4(void *ctxt, dispatch_mach_reason_t reason,
810810
_dispatch_free_unwind_tsd();
811811
_dispatch_set_unwind_tsd(u);
812812
}
813-
#endif
813+
#endif // HAVE_MACH
814814

815815
#endif // DISPATCH_USE_CLIENT_CALLOUT
816816

src/inline_internal.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ DISPATCH_NOTHROW void
4343
_dispatch_client_callout4(void *ctxt, dispatch_mach_reason_t reason,
4444
dispatch_mach_msg_t dmsg, mach_error_t error,
4545
dispatch_mach_handler_function_t f);
46-
#endif
46+
#endif // HAVE_MACH
4747

4848
#else // !DISPATCH_USE_CLIENT_CALLOUT
4949

@@ -70,7 +70,7 @@ _dispatch_client_callout4(void *ctxt, dispatch_mach_reason_t reason,
7070
{
7171
return f(ctxt, reason, dmsg, error);
7272
}
73-
#endif
73+
#endif // HAVE_MACH
7474

7575
#endif // !DISPATCH_USE_CLIENT_CALLOUT
7676

src/internal.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -324,7 +324,7 @@ DISPATCH_NOINLINE
324324
void _dispatch_bug_client(const char* msg);
325325
DISPATCH_NOINLINE
326326
void _dispatch_bug_mach_client(const char *msg, mach_msg_return_t kr);
327-
#endif
327+
#endif // HAVE_MACH
328328
DISPATCH_NOINLINE
329329
void _dispatch_bug_kevent_client(const char* msg, const char* filter,
330330
const char *operation, int err);

src/object.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -538,7 +538,7 @@ - (NSString *)debugDescription {
538538
objc_terminate();
539539
}
540540
}
541-
#endif
541+
#endif // HAVE_MACH
542542

543543
#endif // DISPATCH_USE_CLIENT_CALLOUT
544544

src/queue.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -868,7 +868,7 @@ _dispatch_root_queue_init_pthread_pool(dispatch_root_queue_context_t qc,
868868
&pqc->dpq_thread_attr, qc->dgq_qos, 0));
869869
#endif
870870
}
871-
#endif
871+
#endif // HAVE_PTHREAD_WORKQUEUES
872872
#if USE_MACH_SEM
873873
// override the default FIFO behavior for the pool semaphores
874874
kern_return_t kr = semaphore_create(mach_task_self(),
@@ -1476,7 +1476,7 @@ static const int _dispatch_mgr_sched_qos2prio[] = {
14761476
[_DISPATCH_QOS_CLASS_USER_INITIATED] = 37,
14771477
[_DISPATCH_QOS_CLASS_USER_INTERACTIVE] = 47,
14781478
};
1479-
#endif
1479+
#endif // HAVE_PTHREAD_WORKQUEUE_QOS
14801480

14811481
static void
14821482
_dispatch_mgr_sched_init(void *ctxt DISPATCH_UNUSED)

src/shims/hw_config.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ static inline uint32_t
8181
_dispatch_hw_get_config(_dispatch_hw_config_t c)
8282
{
8383
uint32_t val = 1;
84-
#if defined(__linux__)
84+
#if defined(__linux__) && HAVE_SYSCONF
8585
switch (c) {
8686
case _dispatch_hw_config_logical_cpus:
8787
case _dispatch_hw_config_physical_cpus:

src/source.c

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1013,7 +1013,9 @@ _dispatch_kevent_resume(dispatch_kevent_t dk, uint32_t new_flags,
10131013
return _dispatch_kevent_machport_resume(dk, new_flags, del_flags);
10141014
case DISPATCH_EVFILT_MACH_NOTIFICATION:
10151015
return _dispatch_kevent_mach_notify_resume(dk, new_flags, del_flags);
1016-
#endif
1016+
#else
1017+
(void)new_flags; (void)del_flags;
1018+
#endif // HAVE_MACH
10171019
default:
10181020
if (dk->dk_kevent.flags & EV_DELETE) {
10191021
return 0;
@@ -1028,10 +1030,6 @@ _dispatch_kevent_resume(dispatch_kevent_t dk, uint32_t new_flags,
10281030
}
10291031
return r;
10301032
}
1031-
#if !HAVE_MACH
1032-
(void)new_flags;
1033-
(void)del_flags;
1034-
#endif
10351033
}
10361034

10371035
static long
@@ -1879,7 +1877,7 @@ static void
18791877
_dispatch_kevent_timer_set_delay(_dispatch_kevent_qos_s *ke, uint64_t delay,
18801878
uint64_t leeway, uint64_t nows[])
18811879
{
1882-
// call to return nows[]
1880+
// call to update nows[]
18831881
_dispatch_source_timer_now(nows, DISPATCH_TIMER_KIND_WALL);
18841882
// adjust nsec based delay to msec based and ignore leeway
18851883
delay /= 1000000L;
@@ -1890,7 +1888,6 @@ _dispatch_kevent_timer_set_delay(_dispatch_kevent_qos_s *ke, uint64_t delay,
18901888
}
18911889

18921890
#else
1893-
18941891
static void
18951892
_dispatch_kevent_timer_set_delay(_dispatch_kevent_qos_s *ke, uint64_t delay,
18961893
uint64_t leeway, uint64_t nows[])
@@ -1904,7 +1901,7 @@ _dispatch_kevent_timer_set_delay(_dispatch_kevent_qos_s *ke, uint64_t delay,
19041901
ke->ext[1] = leeway;
19051902
}
19061903
}
1907-
#endif
1904+
#endif // __linux__
19081905

19091906
static bool
19101907
_dispatch_timers_program2(uint64_t nows[], _dispatch_kevent_qos_s *ke,
@@ -4791,6 +4788,7 @@ _dispatch_mach_debug_attr(dispatch_mach_t dm, char* buf, size_t bufsiz)
47914788
dm->dm_refs->dm_sending, dm->dm_refs->dm_disconnect_cnt,
47924789
(bool)(dm->ds_atomic_flags & DSF_CANCELED));
47934790
}
4791+
47944792
size_t
47954793
_dispatch_mach_debug(dispatch_mach_t dm, char* buf, size_t bufsiz)
47964794
{
@@ -4803,7 +4801,7 @@ _dispatch_mach_debug(dispatch_mach_t dm, char* buf, size_t bufsiz)
48034801
offset += dsnprintf(&buf[offset], bufsiz - offset, "}");
48044802
return offset;
48054803
}
4806-
#endif
4804+
#endif // HAVE_MACH
48074805

48084806
#if DISPATCH_DEBUG
48094807
DISPATCH_NOINLINE

src/source_internal.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ enum {
6969
DISPATCH_MACH_RECV_MESSAGE_DIRECT_ONCE = 0x20,
7070
DISPATCH_MACH_RECV_NO_SENDERS = 0x40,
7171
};
72-
#endif
72+
#endif // HAVE_MACH
7373

7474
enum {
7575
DISPATCH_TIMER_WALL_CLOCK = 0x4,
@@ -261,7 +261,7 @@ struct dispatch_mach_msg_s {
261261
char dmsg_buf[0];
262262
};
263263
};
264-
#endif
264+
#endif // HAVE_MACH
265265

266266
#if TARGET_OS_EMBEDDED
267267
#define DSL_HASH_SIZE 64u // must be a power of two
@@ -292,7 +292,7 @@ void _dispatch_mach_msg_invoke(dispatch_mach_msg_t dmsg, dispatch_object_t dou,
292292
size_t _dispatch_mach_msg_debug(dispatch_mach_msg_t dmsg, char* buf, size_t bufsiz);
293293

294294
void _dispatch_mach_barrier_invoke(void *ctxt);
295-
#endif
295+
#endif // HAVE_MACH
296296

297297
unsigned long _dispatch_mgr_wakeup(dispatch_queue_t dq);
298298
void _dispatch_mgr_thread(dispatch_queue_t dq, dispatch_object_t dou,

0 commit comments

Comments
 (0)