|
11 | 11 | //===----------------------------------------------------------------------===//
|
12 | 12 |
|
13 | 13 | import CDispatch
|
| 14 | +import _SwiftDispatchOverlayShims |
14 | 15 |
|
15 | 16 | public extension DispatchSourceProtocol {
|
16 | 17 |
|
@@ -151,66 +152,66 @@ public extension DispatchSource {
|
151 | 152 |
|
152 | 153 | #if HAVE_MACH
|
153 | 154 | public class func makeMachSendSource(port: mach_port_t, eventMask: MachSendEvent, queue: DispatchQueue? = nil) -> DispatchSourceMachSend {
|
154 |
| - let source = dispatch_source_create(_swift_dispatch_source_type_mach_send(), UInt(port), eventMask.rawValue, queue?.__wrapped) |
| 155 | + let source = dispatch_source_create(_swift_dispatch_source_type_MACH_SEND(), UInt(port), eventMask.rawValue, queue?.__wrapped) |
155 | 156 | return DispatchSource(source: source) as DispatchSourceMachSend
|
156 | 157 | }
|
157 | 158 | #endif
|
158 | 159 |
|
159 | 160 | #if HAVE_MACH
|
160 | 161 | public class func makeMachReceiveSource(port: mach_port_t, queue: DispatchQueue? = nil) -> DispatchSourceMachReceive {
|
161 |
| - let source = dispatch_source_create(_swift_dispatch_source_type_mach_recv(), UInt(port), 0, queue?.__wrapped) |
| 162 | + let source = dispatch_source_create(_swift_dispatch_source_type_MACH_RECV(), UInt(port), 0, queue?.__wrapped) |
162 | 163 | return DispatchSource(source) as DispatchSourceMachReceive
|
163 | 164 | }
|
164 | 165 | #endif
|
165 | 166 |
|
166 | 167 | #if HAVE_MACH
|
167 | 168 | public class func makeMemoryPressureSource(eventMask: MemoryPressureEvent, queue: DispatchQueue? = nil) -> DispatchSourceMemoryPressure {
|
168 |
| - let source = dispatch_source_create(_swift_dispatch_source_type_memorypressure(), 0, eventMask.rawValue, queue.__wrapped) |
| 169 | + let source = dispatch_source_create(_swift_dispatch_source_type_MEMORYPRESSURE(), 0, eventMask.rawValue, queue.__wrapped) |
169 | 170 | return DispatchSourceMemoryPressure(source)
|
170 | 171 | }
|
171 | 172 | #endif
|
172 | 173 |
|
173 | 174 | #if !os(Linux) && !os(Android)
|
174 | 175 | public class func makeProcessSource(identifier: pid_t, eventMask: ProcessEvent, queue: DispatchQueue? = nil) -> DispatchSourceProcess {
|
175 |
| - let source = dispatch_source_create(_swift_dispatch_source_type_proc(), UInt(identifier), eventMask.rawValue, queue?.__wrapped) |
| 176 | + let source = dispatch_source_create(_swift_dispatch_source_type_PROC(), UInt(identifier), eventMask.rawValue, queue?.__wrapped) |
176 | 177 | return DispatchSource(source: source) as DispatchSourceProcess
|
177 | 178 | }
|
178 | 179 | #endif
|
179 | 180 |
|
180 | 181 | public class func makeReadSource(fileDescriptor: Int32, queue: DispatchQueue? = nil) -> DispatchSourceRead {
|
181 |
| - let source = dispatch_source_create(_swift_dispatch_source_type_read(), UInt(fileDescriptor), 0, queue?.__wrapped) |
| 182 | + let source = dispatch_source_create(_swift_dispatch_source_type_READ(), UInt(fileDescriptor), 0, queue?.__wrapped) |
182 | 183 | return DispatchSource(source: source) as DispatchSourceRead
|
183 | 184 | }
|
184 | 185 |
|
185 | 186 | public class func makeSignalSource(signal: Int32, queue: DispatchQueue? = nil) -> DispatchSourceSignal {
|
186 |
| - let source = dispatch_source_create(_swift_dispatch_source_type_signal(), UInt(signal), 0, queue?.__wrapped) |
| 187 | + let source = dispatch_source_create(_swift_dispatch_source_type_SIGNAL(), UInt(signal), 0, queue?.__wrapped) |
187 | 188 | return DispatchSource(source: source) as DispatchSourceSignal
|
188 | 189 | }
|
189 | 190 |
|
190 | 191 | public class func makeTimerSource(flags: TimerFlags = [], queue: DispatchQueue? = nil) -> DispatchSourceTimer {
|
191 |
| - let source = dispatch_source_create(_swift_dispatch_source_type_timer(), 0, flags.rawValue, queue?.__wrapped) |
| 192 | + let source = dispatch_source_create(_swift_dispatch_source_type_TIMER(), 0, flags.rawValue, queue?.__wrapped) |
192 | 193 | return DispatchSource(source: source) as DispatchSourceTimer
|
193 | 194 | }
|
194 | 195 |
|
195 | 196 | public class func makeUserDataAddSource(queue: DispatchQueue? = nil) -> DispatchSourceUserDataAdd {
|
196 |
| - let source = dispatch_source_create(_swift_dispatch_source_type_data_add(), 0, 0, queue?.__wrapped) |
| 197 | + let source = dispatch_source_create(_swift_dispatch_source_type_DATA_ADD(), 0, 0, queue?.__wrapped) |
197 | 198 | return DispatchSource(source: source) as DispatchSourceUserDataAdd
|
198 | 199 | }
|
199 | 200 |
|
200 | 201 | public class func makeUserDataOrSource(queue: DispatchQueue? = nil) -> DispatchSourceUserDataOr {
|
201 |
| - let source = dispatch_source_create(_swift_dispatch_source_type_data_or(), 0, 0, queue?.__wrapped) |
| 202 | + let source = dispatch_source_create(_swift_dispatch_source_type_DATA_OR(), 0, 0, queue?.__wrapped) |
202 | 203 | return DispatchSource(source: source) as DispatchSourceUserDataOr
|
203 | 204 | }
|
204 | 205 |
|
205 | 206 | #if !os(Linux) && !os(Android)
|
206 | 207 | public class func makeFileSystemObjectSource(fileDescriptor: Int32, eventMask: FileSystemEvent, queue: DispatchQueue? = nil) -> DispatchSourceFileSystemObject {
|
207 |
| - let source = dispatch_source_create(_swift_dispatch_source_type_vnode(), UInt(fileDescriptor), eventMask.rawValue, queue?.__wrapped) |
| 208 | + let source = dispatch_source_create(_swift_dispatch_source_type_VNODE(), UInt(fileDescriptor), eventMask.rawValue, queue?.__wrapped) |
208 | 209 | return DispatchSource(source: source) as DispatchSourceFileSystemObject
|
209 | 210 | }
|
210 | 211 | #endif
|
211 | 212 |
|
212 | 213 | public class func makeWriteSource(fileDescriptor: Int32, queue: DispatchQueue? = nil) -> DispatchSourceWrite {
|
213 |
| - let source = dispatch_source_create(_swift_dispatch_source_type_write(), UInt(fileDescriptor), 0, queue?.__wrapped) |
| 214 | + let source = dispatch_source_create(_swift_dispatch_source_type_WRITE(), UInt(fileDescriptor), 0, queue?.__wrapped) |
214 | 215 | return DispatchSource(source: source) as DispatchSourceWrite
|
215 | 216 | }
|
216 | 217 | }
|
@@ -350,42 +351,3 @@ public extension DispatchSourceUserDataOr {
|
350 | 351 | dispatch_source_merge_data((self as! DispatchSource).__wrapped, data)
|
351 | 352 | }
|
352 | 353 | }
|
353 |
| - |
354 |
| -@_silgen_name("_swift_dispatch_source_type_DATA_ADD") |
355 |
| -internal func _swift_dispatch_source_type_data_add() -> dispatch_source_type_t |
356 |
| - |
357 |
| -@_silgen_name("_swift_dispatch_source_type_DATA_OR") |
358 |
| -internal func _swift_dispatch_source_type_data_or() -> dispatch_source_type_t |
359 |
| - |
360 |
| -#if HAVE_MACH |
361 |
| -@_silgen_name("_swift_dispatch_source_type_MACH_SEND") |
362 |
| -internal func _swift_dispatch_source_type_mach_send() -> dispatch_source_type_t |
363 |
| - |
364 |
| -@_silgen_name("_swift_dispatch_source_type_MACH_RECV") |
365 |
| -internal func _swift_dispatch_source_type_mach_recv() -> dispatch_source_type_t |
366 |
| - |
367 |
| -@_silgen_name("_swift_dispatch_source_type_MEMORYPRESSURE") |
368 |
| -internal func _swift_dispatch_source_type_memorypressure() -> dispatch_source_type_t |
369 |
| -#endif |
370 |
| - |
371 |
| -#if !os(Linux) && !os(Android) |
372 |
| -@_silgen_name("_swift_dispatch_source_type_PROC") |
373 |
| -internal func _swift_dispatch_source_type_proc() -> dispatch_source_type_t |
374 |
| -#endif |
375 |
| - |
376 |
| -@_silgen_name("_swift_dispatch_source_type_READ") |
377 |
| -internal func _swift_dispatch_source_type_read() -> dispatch_source_type_t |
378 |
| - |
379 |
| -@_silgen_name("_swift_dispatch_source_type_SIGNAL") |
380 |
| -internal func _swift_dispatch_source_type_signal() -> dispatch_source_type_t |
381 |
| - |
382 |
| -@_silgen_name("_swift_dispatch_source_type_TIMER") |
383 |
| -internal func _swift_dispatch_source_type_timer() -> dispatch_source_type_t |
384 |
| - |
385 |
| -#if !os(Linux) && !os(Android) |
386 |
| -@_silgen_name("_swift_dispatch_source_type_VNODE") |
387 |
| -internal func _swift_dispatch_source_type_vnode() -> dispatch_source_type_t |
388 |
| -#endif |
389 |
| - |
390 |
| -@_silgen_name("_swift_dispatch_source_type_WRITE") |
391 |
| -internal func _swift_dispatch_source_type_write() -> dispatch_source_type_t |
0 commit comments