Skip to content

Commit 43a77d2

Browse files
committed
Merge libdispatch-1121
Signed-off-by: Kim Topley <[email protected]>
1 parent 4a2ef8f commit 43a77d2

File tree

102 files changed

+19169
-12256
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

102 files changed

+19169
-12256
lines changed

Diff for: CMakeLists.txt

+2-3
Original file line numberDiff line numberDiff line change
@@ -120,8 +120,7 @@ if(ENABLE_INTERNAL_PTHREAD_WORKQUEUES)
120120
set(HAVE_PTHREAD_WORKQUEUES 0)
121121
else()
122122
check_include_files(pthread/workqueue_private.h HAVE_PTHREAD_WORKQUEUE_PRIVATE_H)
123-
check_include_files(pthread_workqueue.h HAVE_PTHREAD_WORKQUEUE_H)
124-
if(HAVE_PTHREAD_WORKQUEUE_PRIVATE_H AND HAVE_PTHREAD_WORKQUEUE_H)
123+
if(HAVE_PTHREAD_WORKQUEUE_PRIVATE_H)
125124
set(HAVE_PTHREAD_WORKQUEUES 1)
126125
set(DISPATCH_USE_INTERNAL_WORKQUEUE 0)
127126
else()
@@ -184,7 +183,6 @@ check_function_exists(mach_port_construct HAVE_MACH_PORT_CONSTRUCT)
184183
check_function_exists(malloc_create_zone HAVE_MALLOC_CREATE_ZONE)
185184
check_function_exists(pthread_key_init_np HAVE_PTHREAD_KEY_INIT_NP)
186185
check_function_exists(pthread_main_np HAVE_PTHREAD_MAIN_NP)
187-
check_function_exists(pthread_workqueue_setdispatch_np HAVE_PTHREAD_WORKQUEUE_SETDISPATCH_NP)
188186
check_function_exists(strlcpy HAVE_STRLCPY)
189187
check_function_exists(sysconf HAVE_SYSCONF)
190188
check_function_exists(arc4random HAVE_ARC4RANDOM)
@@ -261,6 +259,7 @@ check_symbol_exists(VQ_NEARLOWDISK "sys/mount.h" HAVE_DECL_VQ_NEARLOWDISK)
261259
check_symbol_exists(VQ_QUOTA "sys/mount.h" HAVE_DECL_VQ_QUOTA)
262260
check_symbol_exists(VQ_UPDATE "sys/mount.h" HAVE_DECL_VQ_UPDATE)
263261
check_symbol_exists(VQ_VERYLOWDISK "sys/mount.h" HAVE_DECL_VQ_VERYLOWDISK)
262+
check_symbol_exists(VQ_FREE_SPACE_CHANGE "sys/mount.h" HAVE_DECL_VQ_FREE_SPACE_CHANGE)
264263
check_symbol_exists(strlcpy "string.h" HAVE_STRLCPY)
265264
check_symbol_exists(program_invocation_name "errno.h" HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME)
266265
if (HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME)

Diff for: cmake/config.h.in

+4-3
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,10 @@
8181
you don't. */
8282
#cmakedefine01 HAVE_DECL_VQ_VERYLOWDISK
8383

84+
/* Define to 1 if you have the declaration of `VQ_FREE_SPACE_CHANGE', and to 0 if
85+
you don't. */
86+
#cmakedefine01 HAVE_DECL_VQ_FREE_SPACE_CHANGE
87+
8488
/* Define to 1 if you have the <dlfcn.h> header file. */
8589
#cmakedefine01 HAVE_DLFCN_H
8690

@@ -156,9 +160,6 @@
156160
/* Define to 1 if you have the <pthread/workqueue_private.h> header file. */
157161
#cmakedefine HAVE_PTHREAD_WORKQUEUE_PRIVATE_H
158162

159-
/* Define to 1 if you have the `pthread_workqueue_setdispatch_np' function. */
160-
#cmakedefine HAVE_PTHREAD_WORKQUEUE_SETDISPATCH_NP
161-
162163
/* Define to 1 if you have the <stdint.h> header file. */
163164
#cmakedefine01 HAVE_STDINT_H
164165

Diff for: config/config.h

+261
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,261 @@
1+
/* config/config.h. Generated from config.h.in by configure. */
2+
/* config/config.h.in. Generated from configure.ac by autoheader. */
3+
4+
/* Define to 1 if you have the declaration of `CLOCK_MONOTONIC', and to 0 if
5+
you don't. */
6+
#define HAVE_DECL_CLOCK_MONOTONIC 0
7+
8+
/* Define to 1 if you have the declaration of `CLOCK_REALTIME', and to 0 if
9+
you don't. */
10+
#define CLOCK_REALTIME 0
11+
12+
/* Define to 1 if you have the declaration of `CLOCK_UPTIME', and to 0 if you
13+
don't. */
14+
#define HAVE_DECL_CLOCK_UPTIME 0
15+
16+
/* Define to 1 if you have the declaration of `HAVE_DECL_CLOCK_UPTIME_FAST',
17+
and to 0 if you don't. */
18+
#define HAVE_DECL_CLOCK_UPTIME_FAST 0
19+
20+
/* Define to 1 if you have the declaration of `FD_COPY', and to 0 if you
21+
don't. */
22+
#define HAVE_DECL_FD_COPY 1
23+
24+
/* Define to 1 if you have the declaration of `NOTE_LOWAT', and to 0 if you
25+
don't. */
26+
#define HAVE_DECL_NOTE_LOWAT 1
27+
28+
/* Define to 1 if you have the declaration of `NOTE_NONE', and to 0 if you
29+
don't. */
30+
#define HAVE_DECL_NOTE_NONE 1
31+
32+
/* Define to 1 if you have the declaration of `NOTE_REAP', and to 0 if you
33+
don't. */
34+
#define HAVE_DECL_NOTE_REAP 1
35+
36+
/* Define to 1 if you have the declaration of `NOTE_REVOKE', and to 0 if you
37+
don't. */
38+
#define HAVE_DECL_NOTE_REVOKE 1
39+
40+
/* Define to 1 if you have the declaration of `NOTE_SIGNAL', and to 0 if you
41+
don't. */
42+
#define HAVE_DECL_NOTE_SIGNAL 1
43+
44+
/* Define to 1 if you have the declaration of `POSIX_SPAWN_START_SUSPENDED',
45+
and to 0 if you don't. */
46+
#define HAVE_DECL_POSIX_SPAWN_START_SUSPENDED 1
47+
48+
/* Define to 1 if you have the declaration of `program_invocation_short_name',
49+
and to 0 if you don't. */
50+
#define HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME 0
51+
52+
/* Define to 1 if you have the declaration of `SIGEMT', and to 0 if you don't.
53+
*/
54+
#define HAVE_DECL_SIGEMT 1
55+
56+
/* Define to 1 if you have the declaration of `VQ_UPDATE', and to 0 if you
57+
don't. */
58+
#define HAVE_DECL_VQ_UPDATE 1
59+
60+
/* Define to 1 if you have the declaration of `VQ_VERYLOWDISK', and to 0 if
61+
you don't. */
62+
#define HAVE_DECL_VQ_VERYLOWDISK 1
63+
64+
/* Define to 1 if you have the declaration of `VQ_QUOTA', and to 0 if
65+
you don't. */
66+
#define HAVE_DECL_VQ_QUOTA 1
67+
68+
/* Define to 1 if you have the declaration of `VQ_NEARLOWDISK', and to 0 if
69+
you don't. */
70+
#define HAVE_DECL_VQ_NEARLOWDISK 1
71+
72+
/* Define to 1 if you have the declaration of `VQ_DESIRED_DISK', and to 0 if
73+
you don't. */
74+
#define HAVE_DECL_VQ_DESIRED_DISK 1
75+
76+
/* Define to 1 if you have the <dlfcn.h> header file. */
77+
#define HAVE_DLFCN_H 1
78+
79+
/* Define to 1 if you have the <fcntl.h> header file. */
80+
#define HAVE_FCNTL_H 1
81+
82+
/* Define to 1 if you have the `getprogname' function. */
83+
#define HAVE_GETPROGNAME 1
84+
85+
/* Define to 1 if you have the <inttypes.h> header file. */
86+
#define HAVE_INTTYPES_H 1
87+
88+
/* Define if Apple leaks program is present */
89+
#define HAVE_LEAKS 1
90+
91+
/* Define to 1 if you have the <libkern/OSAtomic.h> header file. */
92+
#define HAVE_LIBKERN_OSATOMIC_H 1
93+
94+
/* Define to 1 if you have the <libkern/OSCrossEndian.h> header file. */
95+
#define HAVE_LIBKERN_OSCROSSENDIAN_H 1
96+
97+
/* Define to 1 if you have the <libproc_internal.h> header file. */
98+
#define HAVE_LIBPROC_INTERNAL_H 1
99+
100+
/* Define if mach is present */
101+
#define HAVE_MACH 1
102+
103+
/* Define to 1 if you have the `mach_absolute_time' function. */
104+
#define HAVE_MACH_ABSOLUTE_TIME 1
105+
106+
/* Define to 1 if you have the `mach_approximate_time' function. */
107+
#define HAVE_MACH_APPROXIMATE_TIME 1
108+
109+
/* Define to 1 if you have the `malloc_create_zone' function. */
110+
#define HAVE_MALLOC_CREATE_ZONE 1
111+
112+
/* Define to 1 if you have the <malloc/malloc.h> header file. */
113+
#define HAVE_MALLOC_MALLOC_H 1
114+
115+
/* Define to 1 if you have the <memory.h> header file. */
116+
#define HAVE_MEMORY_H 1
117+
118+
/* Define if __builtin_trap marked noreturn */
119+
#define HAVE_NORETURN_BUILTIN_TRAP 1
120+
121+
/* Define if you have the Objective-C runtime */
122+
#define HAVE_OBJC 1
123+
124+
/* Define to 1 if you have the `pthread_key_init_np' function. */
125+
#define HAVE_PTHREAD_KEY_INIT_NP 1
126+
127+
/* Define to 1 if you have the <pthread_machdep.h> header file. */
128+
#define HAVE_PTHREAD_MACHDEP_H 1
129+
130+
/* Define to 1 if you have the `pthread_main_np' function. */
131+
#define HAVE_PTHREAD_MAIN_NP 1
132+
133+
/* Define to 1 if you have the <pthread_np.h> header file. */
134+
/* #undef HAVE_PTHREAD_NP_H */
135+
136+
/* Define to 1 if you have the <pthread/qos.h> header file. */
137+
#define HAVE_PTHREAD_QOS_H 1
138+
139+
/* Define if pthread work queues are present */
140+
#define HAVE_PTHREAD_WORKQUEUES 1
141+
142+
/* Define to 1 if you have the <pthread_workqueue.h> header file. */
143+
#define HAVE_PTHREAD_WORKQUEUE_H 1
144+
145+
/* Define to 1 if you have the <pthread/workqueue_private.h> header file. */
146+
#define HAVE_PTHREAD_WORKQUEUE_PRIVATE_H 1
147+
148+
/* Define to 1 if you have the <stdint.h> header file. */
149+
#define HAVE_STDINT_H 1
150+
151+
/* Define to 1 if you have the <stdlib.h> header file. */
152+
#define HAVE_STDLIB_H 1
153+
154+
/* Define to 1 if you have the <strings.h> header file. */
155+
#define HAVE_STRINGS_H 1
156+
157+
/* Define to 1 if you have the <string.h> header file. */
158+
#define HAVE_STRING_H 1
159+
160+
/* Define to 1 if you have the `sysconf' function. */
161+
#define HAVE_SYSCONF 1
162+
163+
/* Define to 1 if you have the <sys/cdefs.h> header file. */
164+
#define HAVE_SYS_CDEFS_H 1
165+
166+
/* Define to 1 if you have the <sys/guarded.h> header file. */
167+
#define HAVE_SYS_GUARDED_H 1
168+
169+
/* Define to 1 if you have the <sys/stat.h> header file. */
170+
#define HAVE_SYS_STAT_H 1
171+
172+
/* Define to 1 if you have the <sys/types.h> header file. */
173+
#define HAVE_SYS_TYPES_H 1
174+
175+
/* Define to 1 if you have the <TargetConditionals.h> header file. */
176+
#define HAVE_TARGETCONDITIONALS_H 1
177+
178+
/* Define to 1 if you have the <unistd.h> header file. */
179+
#define HAVE_UNISTD_H 1
180+
181+
/* Define to 1 if you have the `_pthread_workqueue_init' function. */
182+
#define HAVE__PTHREAD_WORKQUEUE_INIT 1
183+
184+
/* Define to the sub-directory where libtool stores uninstalled libraries. */
185+
#define LT_OBJDIR ".libs/"
186+
187+
/* Name of package */
188+
#define PACKAGE "libdispatch"
189+
190+
/* Define to the address where bug reports for this package should be sent. */
191+
#define PACKAGE_BUGREPORT "[email protected]"
192+
193+
/* Define to the full name of this package. */
194+
#define PACKAGE_NAME "libdispatch"
195+
196+
/* Define to the full name and version of this package. */
197+
#define PACKAGE_STRING "libdispatch 1.3"
198+
199+
/* Define to the one symbol short name of this package. */
200+
#define PACKAGE_TARNAME "libdispatch"
201+
202+
/* Define to the home page for this package. */
203+
#define PACKAGE_URL "http://libdispatch.macosforge.org"
204+
205+
/* Define to the version of this package. */
206+
#define PACKAGE_VERSION "1.3"
207+
208+
/* Define to 1 if you have the ANSI C header files. */
209+
#define STDC_HEADERS 1
210+
211+
/* Define to use non-portable pthread TSD optimizations for Mac OS X) */
212+
#define USE_APPLE_TSD_OPTIMIZATIONS 1
213+
214+
/* Define to tag libdispatch_init as a constructor */
215+
/* #undef USE_LIBDISPATCH_INIT_CONSTRUCTOR */
216+
217+
/* Define to use Mach semaphores */
218+
#define USE_MACH_SEM 1
219+
220+
/* Define to use POSIX semaphores */
221+
/* #undef USE_POSIX_SEM */
222+
223+
/* Enable extensions on AIX 3, Interix. */
224+
#ifndef _ALL_SOURCE
225+
# define _ALL_SOURCE 1
226+
#endif
227+
/* Enable GNU extensions on systems that have them. */
228+
#ifndef _GNU_SOURCE
229+
# define _GNU_SOURCE 1
230+
#endif
231+
/* Enable threading extensions on Solaris. */
232+
#ifndef _POSIX_PTHREAD_SEMANTICS
233+
# define _POSIX_PTHREAD_SEMANTICS 1
234+
#endif
235+
/* Enable extensions on HP NonStop. */
236+
#ifndef _TANDEM_SOURCE
237+
# define _TANDEM_SOURCE 1
238+
#endif
239+
/* Enable general extensions on Solaris. */
240+
#ifndef __EXTENSIONS__
241+
# define __EXTENSIONS__ 1
242+
#endif
243+
244+
245+
/* Version number of package */
246+
#define VERSION "1.3"
247+
248+
/* Define to 1 if on MINIX. */
249+
/* #undef _MINIX */
250+
251+
/* Define to 2 if the system does not provide POSIX.1 features except with
252+
this defined. */
253+
/* #undef _POSIX_1_SOURCE */
254+
255+
/* Define to 1 if you need to in order for `stat' and other things to work. */
256+
/* #undef _POSIX_SOURCE */
257+
258+
/* Define if using Darwin $NOCANCEL */
259+
#define __DARWIN_NON_CANCELABLE 1
260+
261+
#define HAVE_STRLCPY 1

Diff for: dispatch/base.h

+6
Original file line numberDiff line numberDiff line change
@@ -203,6 +203,12 @@
203203
#define DISPATCH_NOESCAPE
204204
#endif
205205

206+
#if __has_attribute(cold)
207+
#define DISPATCH_COLD __attribute__((__cold__))
208+
#else
209+
#define DISPATCH_COLD
210+
#endif
211+
206212
#if __has_feature(assume_nonnull)
207213
#define DISPATCH_ASSUME_NONNULL_BEGIN _Pragma("clang assume_nonnull begin")
208214
#define DISPATCH_ASSUME_NONNULL_END _Pragma("clang assume_nonnull end")

Diff for: dispatch/block.h

+8-7
Original file line numberDiff line numberDiff line change
@@ -48,13 +48,14 @@ __BEGIN_DECLS
4848
*
4949
* @const DISPATCH_BLOCK_DETACHED
5050
* Flag indicating that a dispatch block object should execute disassociated
51-
* from current execution context attributes such as QOS class, os_activity_t
52-
* and properties of the current IPC request (if any). If invoked directly, the
53-
* block object will remove these attributes from the calling thread for the
54-
* duration of the block body (before applying attributes assigned to the block
55-
* object, if any). If submitted to a queue, the block object will be executed
56-
* with the attributes of the queue (or any attributes specifically assigned to
57-
* the block object).
51+
* from current execution context attributes such as os_activity_t
52+
* and properties of the current IPC request (if any). With regard to QoS class,
53+
* the behavior is the same as for DISPATCH_BLOCK_NO_QOS. If invoked directly,
54+
* the block object will remove the other attributes from the calling thread for
55+
* the duration of the block body (before applying attributes assigned to the
56+
* block object, if any). If submitted to a queue, the block object will be
57+
* executed with the attributes of the queue (or any attributes specifically
58+
* assigned to the block object).
5859
*
5960
* @const DISPATCH_BLOCK_ASSIGN_CURRENT
6061
* Flag indicating that a dispatch block object should be assigned the execution

Diff for: dispatch/dispatch.h

+1-3
Original file line numberDiff line numberDiff line change
@@ -50,10 +50,9 @@
5050
#endif
5151
#endif
5252

53-
#define DISPATCH_API_VERSION 20170124
53+
#define DISPATCH_API_VERSION 20180109
5454

5555
#ifndef __DISPATCH_BUILDING_DISPATCH__
56-
5756
#ifndef __DISPATCH_INDIRECT__
5857
#define __DISPATCH_INDIRECT__
5958
#endif
@@ -72,7 +71,6 @@
7271
#include <dispatch/io.h>
7372

7473
#undef __DISPATCH_INDIRECT__
75-
7674
#endif /* !__DISPATCH_BUILDING_DISPATCH__ */
7775

7876
#endif

0 commit comments

Comments
 (0)