Skip to content

Commit 64009c5

Browse files
committed
Fix Typos
- Fix misspellings - Remove ns abbreviation for nanoseconds - Unify over-release spelling
1 parent 39ac720 commit 64009c5

9 files changed

+21
-24
lines changed

src/allocator.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
// once to non-zero. They are not marked volatile. There is a small risk that
3636
// some thread may see a stale 0 value and enter try_create_heap. It will
3737
// waste some time in an allocate syscall, but eventually it will try to
38-
// cmpxchg, expecting to overwite 0 with an address. This will fail
38+
// cmpxchg, expecting to overwrite 0 with an address. This will fail
3939
// (because another thread already did this), the thread will deallocate the
4040
// unused allocated memory, and continue with the new value.
4141
//

src/allocator_internal.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,7 @@ struct dispatch_magazine_header_s {
218218
// Link to the next heap in the chain. Only used in magazine 0's header
219219
dispatch_heap_t dh_next;
220220

221-
// Points to the first bitmap in the page where this CPU succesfully
221+
// Points to the first bitmap in the page where this CPU successfully
222222
// allocated a continuation last time. Only used in the first heap.
223223
bitmap_t *last_found_page;
224224
};

src/data_internal.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ _dispatch_data_leaf(struct dispatch_data_s *dd)
7979
* This is about the number of records required to hold that dispatch data
8080
* if it's not a leaf. Callers either want that value, or have to special
8181
* case the case when the dispatch data *is* a leaf before (and that the actual
82-
* embeded record count of that dispatch data is 0)
82+
* embedded record count of that dispatch data is 0)
8383
*/
8484
DISPATCH_ALWAYS_INLINE
8585
static inline size_t

src/inline_internal.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -552,8 +552,8 @@ _dispatch_reset_defaultpriority(pthread_priority_t priority)
552552
{
553553
#if HAVE_PTHREAD_WORKQUEUE_QOS
554554
pthread_priority_t old_priority = _dispatch_get_defaultpriority();
555-
// if an inner-loop or'd in the override flag to the per-thread priority,
556-
// it needs to be propogated up the chain
555+
// If an inner-loop or'd in the override flag to the per-thread priority,
556+
// it needs to be propagated up the chain.
557557
priority |= old_priority & _PTHREAD_PRIORITY_OVERRIDE_FLAG;
558558

559559
if (slowpath(priority != old_priority)) {

src/object.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ _os_object_retain_with_resurrect(_os_object_t obj)
6464
{
6565
int xref_cnt = _os_object_xrefcnt_inc(obj);
6666
if (slowpath(xref_cnt < 0)) {
67-
_OS_OBJECT_CLIENT_CRASH("Resurrection of an overreleased object");
67+
_OS_OBJECT_CLIENT_CRASH("Resurrection of an over-released object");
6868
}
6969
if (slowpath(xref_cnt == 0)) {
7070
_os_object_retain_internal(obj);

src/provider.d

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ provider dispatch {
6666
*
6767
* Timer configuration indicates that dispatch_source_set_timer() was called.
6868
* Timer programming indicates that the dispatch manager is about to sleep
69-
* for 'deadline' ns (but may wake up earlier if non-timer events occur).
69+
* for 'deadline' (but may wake up earlier if non-timer events occur).
7070
* Time parameters are in nanoseconds, a value of -1 means "forever".
7171
*
7272
* dispatch$target:libdispatch*.dylib::timer-configure

src/source.c

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3144,11 +3144,11 @@ _dispatch_mach_notify_update(dispatch_kevent_t dk, uint32_t new_flags,
31443144
switch(krr) {
31453145
case KERN_INVALID_NAME:
31463146
case KERN_INVALID_RIGHT:
3147-
// Supress errors & clear registration state
3147+
// Suppress errors & clear registration state
31483148
dk->dk_kevent.data &= ~mask;
31493149
break;
31503150
default:
3151-
// Else, we dont expect any errors from mach. Log any errors
3151+
// Else, we don't expect any errors from mach. Log any errors
31523152
if (dispatch_assume_zero(krr)) {
31533153
// log the error & clear registration state
31543154
dk->dk_kevent.data &= ~mask;
@@ -4815,9 +4815,6 @@ _dispatch_kevent_debugger2(void *context)
48154815
fprintf(debug_stream, "<head><title>PID %u</title></head>\n", getpid());
48164816
fprintf(debug_stream, "<body>\n<ul>\n");
48174817

4818-
//fprintf(debug_stream, "<tr><td>DK</td><td>DK</td><td>DK</td><td>DK</td>"
4819-
// "<td>DK</td><td>DK</td><td>DK</td></tr>\n");
4820-
48214818
for (i = 0; i < DSL_HASH_SIZE; i++) {
48224819
if (TAILQ_EMPTY(&_dispatch_sources[i])) {
48234820
continue;

src/voucher.c

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -188,8 +188,8 @@ _voucher_find_and_retain(mach_voucher_t kv)
188188
int xref_cnt = dispatch_atomic_inc2o(v, os_obj_xref_cnt, relaxed);
189189
_dispatch_voucher_debug("retain -> %d", v, xref_cnt + 1);
190190
if (slowpath(xref_cnt < 0)) {
191-
_dispatch_voucher_debug("overrelease", v);
192-
DISPATCH_CRASH("Voucher overrelease");
191+
_dispatch_voucher_debug("over-release", v);
192+
DISPATCH_CRASH("Voucher over-release");
193193
}
194194
if (xref_cnt == 0) {
195195
// resurrection: raced with _voucher_remove
@@ -1398,8 +1398,8 @@ _voucher_activity_try_retain(_voucher_activity_t act)
13981398
int use_cnt = dispatch_atomic_inc2o(act, va_refcnt, relaxed);
13991399
_dispatch_voucher_activity_debug("retain -> %d", act, use_cnt + 1);
14001400
if (slowpath(use_cnt < 0)) {
1401-
_dispatch_voucher_activity_debug("overrelease", act);
1402-
DISPATCH_CRASH("Activity overrelease");
1401+
_dispatch_voucher_activity_debug("over-release", act);
1402+
DISPATCH_CRASH("Activity over-release");
14031403
}
14041404
return use_cnt > 0;
14051405
}
@@ -1427,8 +1427,8 @@ _voucher_activity_release(_voucher_activity_t act)
14271427
return;
14281428
}
14291429
if (slowpath(use_cnt < -1)) {
1430-
_dispatch_voucher_activity_debug("overrelease", act);
1431-
DISPATCH_CRASH("Activity overrelease");
1430+
_dispatch_voucher_activity_debug("over-release", act);
1431+
DISPATCH_CRASH("Activity over-release");
14321432
}
14331433
_voucher_activity_remove(act);
14341434
_voucher_activity_dispose(act);
@@ -1661,8 +1661,8 @@ _voucher_atm_try_retain(_voucher_atm_t vatm)
16611661
int refcnt = dispatch_atomic_inc2o(vatm, vatm_refcnt, relaxed);
16621662
_dispatch_voucher_atm_debug("retain -> %d", vatm, refcnt + 1);
16631663
if (slowpath(refcnt < 0)) {
1664-
_dispatch_voucher_atm_debug("overrelease", vatm);
1665-
DISPATCH_CRASH("ATM overrelease");
1664+
_dispatch_voucher_atm_debug("over-release", vatm);
1665+
DISPATCH_CRASH("ATM over-release");
16661666
}
16671667
return refcnt > 0;
16681668
}
@@ -1690,8 +1690,8 @@ _voucher_atm_release(_voucher_atm_t vatm)
16901690
return;
16911691
}
16921692
if (slowpath(refcnt < -1)) {
1693-
_dispatch_voucher_atm_debug("overrelease", vatm);
1694-
DISPATCH_CRASH("ATM overrelease");
1693+
_dispatch_voucher_atm_debug("over-release", vatm);
1694+
DISPATCH_CRASH("ATM over-release");
16951695
}
16961696
_voucher_atm_remove(vatm);
16971697
_voucher_atm_dispose(vatm, true);

src/voucher_internal.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -271,8 +271,8 @@ _voucher_release(voucher_t voucher)
271271
return;
272272
}
273273
if (slowpath(xref_cnt < -1)) {
274-
_dispatch_voucher_debug("overrelease", voucher);
275-
DISPATCH_CRASH("Voucher overrelease");
274+
_dispatch_voucher_debug("over-release", voucher);
275+
DISPATCH_CRASH("Voucher over-release");
276276
}
277277
return _os_object_xref_dispose((_os_object_t)voucher);
278278
#else

0 commit comments

Comments
 (0)