Skip to content

Commit fae40d1

Browse files
committed
Merge branch 'master' into linux-port-hdd
2 parents a93074c + acd56f6 commit fae40d1

18 files changed

+32
-35
lines changed

dispatch/io.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ __BEGIN_DECLS
3838
* The application may set policies on the dispatch I/O channel to indicate the
3939
* desired frequency of I/O handlers for long-running operations.
4040
*
41-
* Dispatch I/O also provides a memory managment model for I/O buffers that
41+
* Dispatch I/O also provides a memory management model for I/O buffers that
4242
* avoids unnecessary copying of data when pipelined between channels. Dispatch
4343
* I/O monitors the overall memory pressure and I/O access patterns for the
4444
* application to optimize resource utilization.
@@ -168,7 +168,7 @@ DISPATCH_DECL(dispatch_io);
168168
* bytes. Read and write operations on a channel of this type are performed
169169
* serially (in order of creation) and read/write data at the file pointer
170170
* position that is current at the time the operation starts executing.
171-
* Operations of different type (read vs. write) may be perfomed simultaneously.
171+
* Operations of different type (read vs. write) may be performed simultaneously.
172172
* Offsets passed to operations on a channel of this type are ignored.
173173
*
174174
* @const DISPATCH_IO_RANDOM A dispatch I/O channel representing a random

dispatch/queue.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -920,7 +920,7 @@ dispatch_barrier_sync_f(dispatch_queue_t queue,
920920
* The key to set the context for, typically a pointer to a static variable
921921
* specific to the subsystem. Keys are only compared as pointers and never
922922
* dereferenced. Passing a string constant directly is not recommended.
923-
* The NULL key is reserved and attemps to set a context for it are ignored.
923+
* The NULL key is reserved and attempts to set a context for it are ignored.
924924
*
925925
* @param context
926926
* The new subsystem-specific context for the object. This may be NULL.

dispatch/semaphore.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ __BEGIN_DECLS
4444
*
4545
* @discussion
4646
* Passing zero for the value is useful for when two threads need to reconcile
47-
* the completion of a particular event. Passing a value greather than zero is
47+
* the completion of a particular event. Passing a value greater than zero is
4848
* useful for managing a finite pool of resources, where the pool size is equal
4949
* to the value.
5050
*

dispatch/source.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ __BEGIN_DECLS
6464
* is being monitored by the dispatch source. Constants of this type are
6565
* passed as a parameter to dispatch_source_create() and determine how the
6666
* handle argument is interpreted (i.e. as a file descriptor, mach port,
67-
* signal number, process identifer, etc.), and how the mask arugment is
67+
* signal number, process identifier, etc.), and how the mask argument is
6868
* interpreted.
6969
*/
7070
typedef const struct dispatch_source_type_s *dispatch_source_type_t;

dispatch/time.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ dispatch_time(dispatch_time_t when, int64_t delta);
102102
* On Mac OS X the wall clock is based on gettimeofday(3).
103103
*
104104
* @param when
105-
* A struct timespect to add time to. If NULL is passed, then
105+
* A struct timespec to add time to. If NULL is passed, then
106106
* dispatch_walltime() will use the result of gettimeofday(3).
107107
*
108108
* @param delta

private/data_private.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ dispatch_data_apply_f(dispatch_data_t data, void *context,
159159
*
160160
* @param data The data object to make a memory entry for.
161161
* @result A mach port for the newly made memory entry, or
162-
* MACH_PORT_NULL if an error ocurred.
162+
* MACH_PORT_NULL if an error occurred.
163163
*/
164164
__OSX_AVAILABLE_STARTING(__MAC_10_9,__IPHONE_6_0)
165165
DISPATCH_EXPORT DISPATCH_NONNULL_ALL DISPATCH_NOTHROW
@@ -286,7 +286,7 @@ DISPATCH_DATA_FORMAT_TYPE_DECL(utf_any);
286286
* Flags specifying the input format of the source dispatch_data_t
287287
*
288288
* @param output_type
289-
* Flags specifying the expected output format of the resulting transfomation.
289+
* Flags specifying the expected output format of the resulting transformation.
290290
*
291291
* @result
292292
* A newly created dispatch data object, dispatch_data_empty if no has been

private/introspection_private.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -535,7 +535,7 @@ typedef void (*dispatch_introspection_hook_queue_item_complete_t)(
535535
* @typedef dispatch_introspection_hooks_s
536536
*
537537
* @abstract
538-
* A structure of function pointer hoooks into libdispatch.
538+
* A structure of function pointer hooks into libdispatch.
539539
*/
540540

541541
typedef struct dispatch_introspection_hooks_s {

private/voucher_activity_private.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ voucher_activity_start_with_location(voucher_activity_trace_id_t trace_id,
200200
* @function voucher_activity_end
201201
*
202202
* @abstract
203-
* Unmarks the current thread if it is marked as particpating in the activity
203+
* Unmarks the current thread if it is marked as participating in the activity
204204
* with the specified identifier.
205205
*
206206
* @discussion

private/voucher_private.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ voucher_replace_default_voucher(void);
153153
*
154154
* @discussion
155155
* This is only intended for use by CoreFoundation to explicitly manage the
156-
* App Nap state of an application following receiption of a de-nap IPC message.
156+
* App Nap state of an application following reception of a de-nap IPC message.
157157
*
158158
* CAUTION: Do NOT use this SPI without contacting the Darwin Runtime team.
159159
*/

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;
@@ -4825,9 +4825,6 @@ _dispatch_kevent_debugger2(void *context)
48254825
fprintf(debug_stream, "<head><title>PID %u</title></head>\n", getpid());
48264826
fprintf(debug_stream, "<body>\n<ul>\n");
48274827

4828-
//fprintf(debug_stream, "<tr><td>DK</td><td>DK</td><td>DK</td><td>DK</td>"
4829-
// "<td>DK</td><td>DK</td><td>DK</td></tr>\n");
4830-
48314828
for (i = 0; i < DSL_HASH_SIZE; i++) {
48324829
if (TAILQ_EMPTY(&_dispatch_sources[i])) {
48334830
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)