Skip to content

Commit 7459cde

Browse files
committed
Merge pull request #77 from dgrove-oss/SR-1101-for-experimental-foundation
SR-1101 : clang 3.9 doesn't allow typeof on bit-field
2 parents 1c0824f + d4986b5 commit 7459cde

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

src/inline_internal.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -497,23 +497,23 @@ static inline void
497497
_dispatch_queue_set_bound_thread(dispatch_queue_t dq)
498498
{
499499
//Tag thread-bound queues with the owning thread
500-
dispatch_assert(dq->dq_is_thread_bound);
500+
dispatch_assert(dq->dq_is_thread_bound != 0);
501501
dq->dq_thread = _dispatch_thread_port();
502502
}
503503

504504
DISPATCH_ALWAYS_INLINE
505505
static inline void
506506
_dispatch_queue_clear_bound_thread(dispatch_queue_t dq)
507507
{
508-
dispatch_assert(dq->dq_is_thread_bound);
508+
dispatch_assert(dq->dq_is_thread_bound != 0);
509509
dq->dq_thread = MACH_PORT_NULL;
510510
}
511511

512512
DISPATCH_ALWAYS_INLINE
513513
static inline mach_port_t
514514
_dispatch_queue_get_bound_thread(dispatch_queue_t dq)
515515
{
516-
dispatch_assert(dq->dq_is_thread_bound);
516+
dispatch_assert(dq->dq_is_thread_bound != 0);
517517
return dq->dq_thread;
518518
}
519519

src/queue.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2839,7 +2839,7 @@ _dispatch_barrier_sync_f_slow_invoke(void *ctxt)
28392839

28402840
dispatch_assert(dq == _dispatch_queue_get_current());
28412841
#if DISPATCH_COCOA_COMPAT
2842-
if (slowpath(dq->dq_is_thread_bound)) {
2842+
if (slowpath(dq->dq_is_thread_bound != 0)) {
28432843
// The queue is bound to a non-dispatch thread (e.g. main thread)
28442844
_dispatch_continuation_voucher_adopt(dc);
28452845
_dispatch_client_callout(dc->dc_ctxt, dc->dc_func);
@@ -2879,7 +2879,7 @@ _dispatch_barrier_sync_f_slow(dispatch_queue_t dq, void *ctxt,
28792879
// It's preferred to execute synchronous blocks on the current thread
28802880
// due to thread-local side effects, garbage collection, etc. However,
28812881
// blocks submitted to the main thread MUST be run on the main thread
2882-
if (slowpath(dq->dq_is_thread_bound)) {
2882+
if (slowpath(dq->dq_is_thread_bound != 0)) {
28832883
_dispatch_continuation_voucher_set(&dc, 0);
28842884
}
28852885
#endif
@@ -3074,7 +3074,7 @@ _dispatch_barrier_sync_slow(dispatch_queue_t dq, void (^work)(void))
30743074
void
30753075
dispatch_barrier_sync(dispatch_queue_t dq, void (^work)(void))
30763076
{
3077-
if (slowpath(dq->dq_is_thread_bound) ||
3077+
if (slowpath(dq->dq_is_thread_bound != 0) ||
30783078
slowpath(_dispatch_block_has_private_data(work))) {
30793079
return _dispatch_barrier_sync_slow(dq, work);
30803080
}
@@ -3279,7 +3279,7 @@ dispatch_sync(dispatch_queue_t dq, void (^work)(void))
32793279
if (fastpath(dq->dq_width == 1)) {
32803280
return dispatch_barrier_sync(dq, work);
32813281
}
3282-
if (slowpath(dq->dq_is_thread_bound) ||
3282+
if (slowpath(dq->dq_is_thread_bound != 0) ||
32833283
slowpath(_dispatch_block_has_private_data(work)) ) {
32843284
return _dispatch_sync_slow(dq, work);
32853285
}

src/source.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -621,7 +621,7 @@ _dispatch_source_kevent_resume(dispatch_source_t ds, uint32_t new_flags)
621621
static void
622622
_dispatch_source_kevent_register(dispatch_source_t ds)
623623
{
624-
dispatch_assert_zero(ds->ds_is_installed);
624+
dispatch_assert(ds->ds_is_installed == 0);
625625
switch (ds->ds_dkev->dk_kevent.filter) {
626626
case DISPATCH_EVFILT_TIMER:
627627
_dispatch_timers_update(ds);

0 commit comments

Comments
 (0)