|
11 | 11 | //===----------------------------------------------------------------------===//
|
12 | 12 |
|
13 | 13 | // import Foundation
|
14 |
| -import SwiftShims |
| 14 | +import _SwiftDispatchOverlayShims |
15 | 15 |
|
16 | 16 | public extension DispatchSourceProtocol {
|
17 | 17 | typealias DispatchSourceHandler = @convention(block) () -> Void
|
@@ -153,56 +153,56 @@ public extension DispatchSource {
|
153 | 153 |
|
154 | 154 | public class func makeMachSendSource(port: mach_port_t, eventMask: MachSendEvent, queue: DispatchQueue? = nil) -> DispatchSourceMachSend {
|
155 | 155 | return __dispatch_source_create(
|
156 |
| - _swift_dispatch_source_type_mach_send(), UInt(port), eventMask.rawValue, queue) as DispatchSourceMachSend |
| 156 | + _swift_dispatch_source_type_MACH_SEND(), UInt(port), eventMask.rawValue, queue) as DispatchSourceMachSend |
157 | 157 | }
|
158 | 158 |
|
159 | 159 | public class func makeMachReceiveSource(port: mach_port_t, queue: DispatchQueue? = nil) -> DispatchSourceMachReceive {
|
160 | 160 | return __dispatch_source_create(
|
161 |
| - _swift_dispatch_source_type_mach_recv(), UInt(port), 0, queue) as DispatchSourceMachReceive |
| 161 | + _swift_dispatch_source_type_MACH_RECV(), UInt(port), 0, queue) as DispatchSourceMachReceive |
162 | 162 | }
|
163 | 163 |
|
164 | 164 | public class func makeMemoryPressureSource(eventMask: MemoryPressureEvent, queue: DispatchQueue? = nil) -> DispatchSourceMemoryPressure {
|
165 | 165 | return __dispatch_source_create(
|
166 |
| - _swift_dispatch_source_type_memorypressure(), 0, eventMask.rawValue, queue) as DispatchSourceMemoryPressure |
| 166 | + _swift_dispatch_source_type_MEMORYPRESSURE(), 0, eventMask.rawValue, queue) as DispatchSourceMemoryPressure |
167 | 167 | }
|
168 | 168 |
|
169 | 169 | public class func makeProcessSource(identifier: pid_t, eventMask: ProcessEvent, queue: DispatchQueue? = nil) -> DispatchSourceProcess {
|
170 | 170 | return __dispatch_source_create(
|
171 |
| - _swift_dispatch_source_type_proc(), UInt(identifier), eventMask.rawValue, queue) as DispatchSourceProcess |
| 171 | + _swift_dispatch_source_type_PROC(), UInt(identifier), eventMask.rawValue, queue) as DispatchSourceProcess |
172 | 172 | }
|
173 | 173 |
|
174 | 174 | public class func makeReadSource(fileDescriptor: Int32, queue: DispatchQueue? = nil) -> DispatchSourceRead {
|
175 | 175 | return __dispatch_source_create(
|
176 |
| - _swift_dispatch_source_type_read(), UInt(fileDescriptor), 0, queue) as DispatchSourceRead |
| 176 | + _swift_dispatch_source_type_READ(), UInt(fileDescriptor), 0, queue) as DispatchSourceRead |
177 | 177 | }
|
178 | 178 |
|
179 | 179 | public class func makeSignalSource(signal: Int32, queue: DispatchQueue? = nil) -> DispatchSourceSignal {
|
180 | 180 | return __dispatch_source_create(
|
181 |
| - _swift_dispatch_source_type_signal(), UInt(signal), 0, queue) as DispatchSourceSignal |
| 181 | + _swift_dispatch_source_type_SIGNAL(), UInt(signal), 0, queue) as DispatchSourceSignal |
182 | 182 | }
|
183 | 183 |
|
184 | 184 | public class func makeTimerSource(flags: TimerFlags = [], queue: DispatchQueue? = nil) -> DispatchSourceTimer {
|
185 |
| - return __dispatch_source_create(_swift_dispatch_source_type_timer(), 0, flags.rawValue, queue) as DispatchSourceTimer |
| 185 | + return __dispatch_source_create(_swift_dispatch_source_type_TIMER(), 0, flags.rawValue, queue) as DispatchSourceTimer |
186 | 186 | }
|
187 | 187 |
|
188 | 188 | public class func makeUserDataAddSource(queue: DispatchQueue? = nil) -> DispatchSourceUserDataAdd {
|
189 |
| - return __dispatch_source_create(_swift_dispatch_source_type_data_add(), 0, 0, queue) as DispatchSourceUserDataAdd |
| 189 | + return __dispatch_source_create(_swift_dispatch_source_type_DATA_ADD(), 0, 0, queue) as DispatchSourceUserDataAdd |
190 | 190 | }
|
191 | 191 |
|
192 | 192 | public class func makeUserDataOrSource(queue: DispatchQueue? = nil) -> DispatchSourceUserDataOr {
|
193 |
| - return __dispatch_source_create(_swift_dispatch_source_type_data_or(), 0, 0, queue) as DispatchSourceUserDataOr |
| 193 | + return __dispatch_source_create(_swift_dispatch_source_type_DATA_OR(), 0, 0, queue) as DispatchSourceUserDataOr |
194 | 194 | }
|
195 | 195 |
|
196 | 196 | public class func makeFileSystemObjectSource(
|
197 | 197 | fileDescriptor: Int32, eventMask: FileSystemEvent, queue: DispatchQueue? = nil) -> DispatchSourceFileSystemObject
|
198 | 198 | {
|
199 | 199 | return __dispatch_source_create(
|
200 |
| - _swift_dispatch_source_type_vnode(), UInt(fileDescriptor), eventMask.rawValue, queue) as DispatchSourceFileSystemObject |
| 200 | + _swift_dispatch_source_type_VNODE(), UInt(fileDescriptor), eventMask.rawValue, queue) as DispatchSourceFileSystemObject |
201 | 201 | }
|
202 | 202 |
|
203 | 203 | public class func makeWriteSource(fileDescriptor: Int32, queue: DispatchQueue? = nil) -> DispatchSourceWrite {
|
204 | 204 | return __dispatch_source_create(
|
205 |
| - _swift_dispatch_source_type_write(), UInt(fileDescriptor), 0, queue) as DispatchSourceWrite |
| 205 | + _swift_dispatch_source_type_WRITE(), UInt(fileDescriptor), 0, queue) as DispatchSourceWrite |
206 | 206 | }
|
207 | 207 | }
|
208 | 208 |
|
@@ -331,36 +331,3 @@ public extension DispatchSourceUserDataOr {
|
331 | 331 | __dispatch_source_merge_data(self as! DispatchSource, data)
|
332 | 332 | }
|
333 | 333 | }
|
334 |
| - |
335 |
| -@_silgen_name("_swift_dispatch_source_type_DATA_ADD") |
336 |
| -internal func _swift_dispatch_source_type_data_add() -> __dispatch_source_type_t |
337 |
| - |
338 |
| -@_silgen_name("_swift_dispatch_source_type_DATA_OR") |
339 |
| -internal func _swift_dispatch_source_type_data_or() -> __dispatch_source_type_t |
340 |
| - |
341 |
| -@_silgen_name("_swift_dispatch_source_type_MACH_SEND") |
342 |
| -internal func _swift_dispatch_source_type_mach_send() -> __dispatch_source_type_t |
343 |
| - |
344 |
| -@_silgen_name("_swift_dispatch_source_type_MACH_RECV") |
345 |
| -internal func _swift_dispatch_source_type_mach_recv() -> __dispatch_source_type_t |
346 |
| - |
347 |
| -@_silgen_name("_swift_dispatch_source_type_MEMORYPRESSURE") |
348 |
| -internal func _swift_dispatch_source_type_memorypressure() -> __dispatch_source_type_t |
349 |
| - |
350 |
| -@_silgen_name("_swift_dispatch_source_type_PROC") |
351 |
| -internal func _swift_dispatch_source_type_proc() -> __dispatch_source_type_t |
352 |
| - |
353 |
| -@_silgen_name("_swift_dispatch_source_type_READ") |
354 |
| -internal func _swift_dispatch_source_type_read() -> __dispatch_source_type_t |
355 |
| - |
356 |
| -@_silgen_name("_swift_dispatch_source_type_SIGNAL") |
357 |
| -internal func _swift_dispatch_source_type_signal() -> __dispatch_source_type_t |
358 |
| - |
359 |
| -@_silgen_name("_swift_dispatch_source_type_TIMER") |
360 |
| -internal func _swift_dispatch_source_type_timer() -> __dispatch_source_type_t |
361 |
| - |
362 |
| -@_silgen_name("_swift_dispatch_source_type_VNODE") |
363 |
| -internal func _swift_dispatch_source_type_vnode() -> __dispatch_source_type_t |
364 |
| - |
365 |
| -@_silgen_name("_swift_dispatch_source_type_WRITE") |
366 |
| -internal func _swift_dispatch_source_type_write() -> __dispatch_source_type_t |
0 commit comments