|
11 | 11 | //===----------------------------------------------------------------------===//
|
12 | 12 |
|
13 | 13 | import CDispatch
|
| 14 | +import _SwiftDispatchOverlayShims |
14 | 15 |
|
15 | 16 | public extension DispatchSourceProtocol {
|
16 | 17 |
|
@@ -151,71 +152,71 @@ 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 | public class func makeUserDataReplaceSource(queue: DispatchQueue? = nil) -> DispatchSourceUserDataReplace {
|
206 |
| - let source = dispatch_source_create(_swift_dispatch_source_type_data_replace(), 0, 0, queue?.__wrapped) |
| 207 | + let source = dispatch_source_create(_swift_dispatch_source_type_DATA_REPLACE(), 0, 0, queue?.__wrapped) |
207 | 208 | return DispatchSource(source: source) as DispatchSourceUserDataReplace
|
208 | 209 | }
|
209 | 210 |
|
210 | 211 | #if !os(Linux) && !os(Android)
|
211 | 212 | public class func makeFileSystemObjectSource(fileDescriptor: Int32, eventMask: FileSystemEvent, queue: DispatchQueue? = nil) -> DispatchSourceFileSystemObject {
|
212 |
| - let source = dispatch_source_create(_swift_dispatch_source_type_vnode(), UInt(fileDescriptor), eventMask.rawValue, queue?.__wrapped) |
| 213 | + let source = dispatch_source_create(_swift_dispatch_source_type_VNODE(), UInt(fileDescriptor), eventMask.rawValue, queue?.__wrapped) |
213 | 214 | return DispatchSource(source: source) as DispatchSourceFileSystemObject
|
214 | 215 | }
|
215 | 216 | #endif
|
216 | 217 |
|
217 | 218 | public class func makeWriteSource(fileDescriptor: Int32, queue: DispatchQueue? = nil) -> DispatchSourceWrite {
|
218 |
| - let source = dispatch_source_create(_swift_dispatch_source_type_write(), UInt(fileDescriptor), 0, queue?.__wrapped) |
| 219 | + let source = dispatch_source_create(_swift_dispatch_source_type_WRITE(), UInt(fileDescriptor), 0, queue?.__wrapped) |
219 | 220 | return DispatchSource(source: source) as DispatchSourceWrite
|
220 | 221 | }
|
221 | 222 | }
|
@@ -669,45 +670,3 @@ public extension DispatchSourceUserDataReplace {
|
669 | 670 | dispatch_source_merge_data((self as! DispatchSource).__wrapped, data)
|
670 | 671 | }
|
671 | 672 | }
|
672 |
| - |
673 |
| -@_silgen_name("_swift_dispatch_source_type_DATA_ADD") |
674 |
| -internal func _swift_dispatch_source_type_data_add() -> dispatch_source_type_t |
675 |
| - |
676 |
| -@_silgen_name("_swift_dispatch_source_type_DATA_OR") |
677 |
| -internal func _swift_dispatch_source_type_data_or() -> dispatch_source_type_t |
678 |
| - |
679 |
| -@_silgen_name("_swift_dispatch_source_type_DATA_REPLACE") |
680 |
| -internal func _swift_dispatch_source_type_data_replace() -> dispatch_source_type_t |
681 |
| - |
682 |
| -#if HAVE_MACH |
683 |
| -@_silgen_name("_swift_dispatch_source_type_MACH_SEND") |
684 |
| -internal func _swift_dispatch_source_type_mach_send() -> dispatch_source_type_t |
685 |
| - |
686 |
| -@_silgen_name("_swift_dispatch_source_type_MACH_RECV") |
687 |
| -internal func _swift_dispatch_source_type_mach_recv() -> dispatch_source_type_t |
688 |
| - |
689 |
| -@_silgen_name("_swift_dispatch_source_type_MEMORYPRESSURE") |
690 |
| -internal func _swift_dispatch_source_type_memorypressure() -> dispatch_source_type_t |
691 |
| -#endif |
692 |
| - |
693 |
| -#if !os(Linux) && !os(Android) |
694 |
| -@_silgen_name("_swift_dispatch_source_type_PROC") |
695 |
| -internal func _swift_dispatch_source_type_proc() -> dispatch_source_type_t |
696 |
| -#endif |
697 |
| - |
698 |
| -@_silgen_name("_swift_dispatch_source_type_READ") |
699 |
| -internal func _swift_dispatch_source_type_read() -> dispatch_source_type_t |
700 |
| - |
701 |
| -@_silgen_name("_swift_dispatch_source_type_SIGNAL") |
702 |
| -internal func _swift_dispatch_source_type_signal() -> dispatch_source_type_t |
703 |
| - |
704 |
| -@_silgen_name("_swift_dispatch_source_type_TIMER") |
705 |
| -internal func _swift_dispatch_source_type_timer() -> dispatch_source_type_t |
706 |
| - |
707 |
| -#if !os(Linux) && !os(Android) |
708 |
| -@_silgen_name("_swift_dispatch_source_type_VNODE") |
709 |
| -internal func _swift_dispatch_source_type_vnode() -> dispatch_source_type_t |
710 |
| -#endif |
711 |
| - |
712 |
| -@_silgen_name("_swift_dispatch_source_type_WRITE") |
713 |
| -internal func _swift_dispatch_source_type_write() -> dispatch_source_type_t |
0 commit comments