From 64009c58f20a1e05b8fb26cf58939e47c95403b3 Mon Sep 17 00:00:00 2001 From: Daniel Worku Date: Thu, 3 Dec 2015 20:20:35 -0600 Subject: [PATCH 1/2] Fix Typos - Fix misspellings - Remove ns abbreviation for nanoseconds - Unify over-release spelling --- src/allocator.c | 2 +- src/allocator_internal.h | 2 +- src/data_internal.h | 2 +- src/inline_internal.h | 4 ++-- src/object.c | 2 +- src/provider.d | 2 +- src/source.c | 7 ++----- src/voucher.c | 20 ++++++++++---------- src/voucher_internal.h | 4 ++-- 9 files changed, 21 insertions(+), 24 deletions(-) diff --git a/src/allocator.c b/src/allocator.c index d6db272cb..926f6dbbd 100644 --- a/src/allocator.c +++ b/src/allocator.c @@ -35,7 +35,7 @@ // once to non-zero. They are not marked volatile. There is a small risk that // some thread may see a stale 0 value and enter try_create_heap. It will // waste some time in an allocate syscall, but eventually it will try to -// cmpxchg, expecting to overwite 0 with an address. This will fail +// cmpxchg, expecting to overwrite 0 with an address. This will fail // (because another thread already did this), the thread will deallocate the // unused allocated memory, and continue with the new value. // diff --git a/src/allocator_internal.h b/src/allocator_internal.h index 893ba8283..85171eea7 100644 --- a/src/allocator_internal.h +++ b/src/allocator_internal.h @@ -218,7 +218,7 @@ struct dispatch_magazine_header_s { // Link to the next heap in the chain. Only used in magazine 0's header dispatch_heap_t dh_next; - // Points to the first bitmap in the page where this CPU succesfully + // Points to the first bitmap in the page where this CPU successfully // allocated a continuation last time. Only used in the first heap. bitmap_t *last_found_page; }; diff --git a/src/data_internal.h b/src/data_internal.h index 40a780ce9..90f05ee24 100644 --- a/src/data_internal.h +++ b/src/data_internal.h @@ -79,7 +79,7 @@ _dispatch_data_leaf(struct dispatch_data_s *dd) * This is about the number of records required to hold that dispatch data * if it's not a leaf. Callers either want that value, or have to special * case the case when the dispatch data *is* a leaf before (and that the actual - * embeded record count of that dispatch data is 0) + * embedded record count of that dispatch data is 0) */ DISPATCH_ALWAYS_INLINE static inline size_t diff --git a/src/inline_internal.h b/src/inline_internal.h index 5cc4cd884..0c885d624 100644 --- a/src/inline_internal.h +++ b/src/inline_internal.h @@ -552,8 +552,8 @@ _dispatch_reset_defaultpriority(pthread_priority_t priority) { #if HAVE_PTHREAD_WORKQUEUE_QOS pthread_priority_t old_priority = _dispatch_get_defaultpriority(); - // if an inner-loop or'd in the override flag to the per-thread priority, - // it needs to be propogated up the chain + // If an inner-loop or'd in the override flag to the per-thread priority, + // it needs to be propagated up the chain. priority |= old_priority & _PTHREAD_PRIORITY_OVERRIDE_FLAG; if (slowpath(priority != old_priority)) { diff --git a/src/object.c b/src/object.c index 4089ba0c5..f71049f13 100644 --- a/src/object.c +++ b/src/object.c @@ -64,7 +64,7 @@ _os_object_retain_with_resurrect(_os_object_t obj) { int xref_cnt = _os_object_xrefcnt_inc(obj); if (slowpath(xref_cnt < 0)) { - _OS_OBJECT_CLIENT_CRASH("Resurrection of an overreleased object"); + _OS_OBJECT_CLIENT_CRASH("Resurrection of an over-released object"); } if (slowpath(xref_cnt == 0)) { _os_object_retain_internal(obj); diff --git a/src/provider.d b/src/provider.d index ede3c56b3..828f95c2d 100644 --- a/src/provider.d +++ b/src/provider.d @@ -66,7 +66,7 @@ provider dispatch { * * Timer configuration indicates that dispatch_source_set_timer() was called. * Timer programming indicates that the dispatch manager is about to sleep - * for 'deadline' ns (but may wake up earlier if non-timer events occur). + * for 'deadline' (but may wake up earlier if non-timer events occur). * Time parameters are in nanoseconds, a value of -1 means "forever". * * dispatch$target:libdispatch*.dylib::timer-configure diff --git a/src/source.c b/src/source.c index dde7db9af..18087a211 100644 --- a/src/source.c +++ b/src/source.c @@ -3144,11 +3144,11 @@ _dispatch_mach_notify_update(dispatch_kevent_t dk, uint32_t new_flags, switch(krr) { case KERN_INVALID_NAME: case KERN_INVALID_RIGHT: - // Supress errors & clear registration state + // Suppress errors & clear registration state dk->dk_kevent.data &= ~mask; break; default: - // Else, we dont expect any errors from mach. Log any errors + // Else, we don't expect any errors from mach. Log any errors if (dispatch_assume_zero(krr)) { // log the error & clear registration state dk->dk_kevent.data &= ~mask; @@ -4815,9 +4815,6 @@ _dispatch_kevent_debugger2(void *context) fprintf(debug_stream, "PID %u\n", getpid()); fprintf(debug_stream, "\n