1 //===----------------------------------------------------------------------===//
3 // This source file is part of the Swift.org open source project
5 // Copyright (c) 2014 - 2016 Apple Inc. and the Swift project authors
6 // Licensed under Apache License v2.0 with Runtime Library Exception
8 // See http://swift.org/LICENSE.txt for license information
9 // See http://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
11 //===----------------------------------------------------------------------===//
13 // Redeclarations of all SwiftPrivate functions with appropriate markup.
17 @available(*, unavailable, renamed:"DispatchQueue.init(label:attributes:target:)")
18 public func dispatch_queue_create(_ label: UnsafePointer<Int8>?, _ attr: dispatch_queue_attr_t?) -> DispatchQueue
23 @available(*, unavailable, renamed:"DispatchQueue.init(label:attributes:target:)")
24 public func dispatch_queue_create_with_target(_ label: UnsafePointer<Int8>?, _ attr: dispatch_queue_attr_t?, _ queue: DispatchQueue?) -> DispatchQueue
29 @available(*, unavailable, renamed:"DispatchIO.init(type:fileDescriptor:queue:cleanupHandler:)")
30 public func dispatch_io_create(_ type: UInt, _ fd: Int32, _ queue: DispatchQueue, _ cleanup_handler: (Int32) -> Void) -> DispatchIO
35 @available(*, unavailable, renamed:"DispatchIO.init(type:path:oflag:mode:queue:cleanupHandler:)")
36 public func dispatch_io_create_with_path(_ type: UInt, _ path: UnsafePointer<Int8>, _ oflag: Int32, _ mode: mode_t, _ queue: DispatchQueue, _ cleanup_handler: (Int32) -> Void) -> DispatchIO
41 @available(*, unavailable, renamed:"DispatchIO.init(type:io:queue:cleanupHandler:)")
42 public func dispatch_io_create_with_io(_ type: UInt, _ io: DispatchIO, _ queue: DispatchQueue, _ cleanup_handler: (Int32) -> Void) -> DispatchIO
47 @available(*, unavailable, renamed:"DispatchIO.read(fileDescriptor:length:queue:handler:)")
48 public func dispatch_read(_ fd: Int32, _ length: Int, _ queue: DispatchQueue, _ handler: (dispatch_data_t, Int32) -> Void)
53 @available(*, unavailable, renamed:"DispatchIO.read(self:offset:length:queue:ioHandler:)")
54 func dispatch_io_read(_ channel: DispatchIO, _ offset: off_t, _ length: Int, _ queue: DispatchQueue, _ io_handler: (Bool, dispatch_data_t?, Int32) -> Void)
59 @available(*, unavailable, renamed:"DispatchIO.write(self:offset:data:queue:ioHandler:)")
60 func dispatch_io_write(_ channel: DispatchIO, _ offset: off_t, _ data: dispatch_data_t, _ queue: DispatchQueue, _ io_handler: (Bool, dispatch_data_t?, Int32) -> Void)
65 @available(*, unavailable, renamed:"DispatchIO.write(fileDescriptor:data:queue:handler:)")
66 func dispatch_write(_ fd: Int32, _ data: dispatch_data_t, _ queue: DispatchQueue, _ handler: (dispatch_data_t?, Int32) -> Void)
71 @available(*, unavailable, renamed:"DispatchData.init(bytes:)")
72 public func dispatch_data_create(_ buffer: UnsafePointer<Void>, _ size: Int, _ queue: DispatchQueue?, _ destructor: (() -> Void)?) -> dispatch_data_t
77 @available(*, unavailable, renamed:"getter:DispatchData.count(self:)")
78 public func dispatch_data_get_size(_ data: dispatch_data_t) -> Int
83 @available(*, unavailable, renamed:"DispatchData.withUnsafeBytes(self:body:)")
84 public func dispatch_data_create_map(_ data: dispatch_data_t, _ buffer_ptr: UnsafeMutablePointer<UnsafePointer<Void>?>?, _ size_ptr: UnsafeMutablePointer<Int>?) -> dispatch_data_t
89 @available(*, unavailable, renamed:"DispatchData.append(self:_:)")
90 public func dispatch_data_create_concat(_ data1: dispatch_data_t, _ data2: dispatch_data_t) -> dispatch_data_t
95 @available(*, unavailable, renamed:"DispatchData.subdata(self:in:)")
96 public func dispatch_data_create_subrange(_ data: dispatch_data_t, _ offset: Int, _ length: Int) -> dispatch_data_t
101 @available(*, unavailable, renamed:"DispatchData.enumerateBytes(self:block:)")
102 public func dispatch_data_apply(_ data: dispatch_data_t, _ applier: (dispatch_data_t, Int, UnsafePointer<Void>, Int) -> Bool) -> Bool
107 @available(*, unavailable, renamed:"DispatchData.region(self:location:)")
108 public func dispatch_data_copy_region(_ data: dispatch_data_t, _ location: Int, _ offset_ptr: UnsafeMutablePointer<Int>) -> dispatch_data_t
113 @available(*, unavailable, renamed:"DispatchQueue.asynchronously(self:group:qos:flags:execute:)")
114 public func dispatch_group_async(_ group: DispatchGroup, _ queue: DispatchQueue, _ block: () -> Void)
119 @available(*, unavailable, renamed: "DispatchGroup.notify(self:qos:flags:queue:execute:)")
120 public func dispatch_group_notify(_ group: DispatchGroup, _ queue: DispatchQueue, _ block: () -> Void)
125 @available(*, unavailable, renamed:"DispatchGroup.wait(self:timeout:)")
126 public func dispatch_group_wait(_ group: DispatchGroup, _ timeout: dispatch_time_t) -> Int
131 @available(*, unavailable, renamed:"DispatchIO.close(self:flags:)")
132 public func dispatch_io_close(_ channel: DispatchIO, _ flags: UInt)
137 @available(*, unavailable, renamed:"DispatchIO.setInterval(self:interval:flags:)")
138 public func dispatch_io_set_interval(_ channel: DispatchIO, _ interval: UInt64, _ flags: UInt)
143 @available(*, unavailable, renamed:"DispatchQueue.apply(attributes:iterations:execute:)")
144 public func dispatch_apply(_ iterations: Int, _ queue: DispatchQueue, _ block: @noescape (Int) -> Void)
149 @available(*, unavailable, renamed:"DispatchQueue.asynchronously(self:execute:)")
150 public func dispatch_async(_ queue: DispatchQueue, _ block: () -> Void)
155 @available(*, unavailable, renamed:"DispatchQueue.global(attributes:)")
156 public func dispatch_get_global_queue(_ identifier: Int, _ flags: UInt) -> DispatchQueue
161 @available(*, unavailable, renamed: "DispatchQueue.main")
162 public func dispatch_get_main_queue() -> DispatchQueue
167 @available(*, unavailable, renamed:"DispatchQueueAttributes.initiallyInactive")
168 public func dispatch_queue_attr_make_initially_inactive(_ attr: dispatch_queue_attr_t?) -> dispatch_queue_attr_t
173 @available(*, unavailable, renamed:"DispatchQueueAttributes.autoreleaseWorkItem")
174 public func dispatch_queue_attr_make_with_autorelease_frequency(_ attr: dispatch_queue_attr_t?, _ frequency: dispatch_autorelease_frequency_t) -> dispatch_queue_attr_t
179 @available(*, unavailable, renamed:"DispatchQueueAttributes.qosUserInitiated")
180 public func dispatch_queue_attr_make_with_qos_class(_ attr: dispatch_queue_attr_t?, _ qos_class: dispatch_qos_class_t, _ relative_priority: Int32) -> dispatch_queue_attr_t
185 @available(*, unavailable, renamed:"getter:DispatchQueue.label(self:)")
186 public func dispatch_queue_get_label(_ queue: DispatchQueue?) -> UnsafePointer<Int8>
191 @available(*, unavailable, renamed:"getter:DispatchQueue.qos(self:)")
192 public func dispatch_queue_get_qos_class(_ queue: DispatchQueue, _ relative_priority_ptr: UnsafeMutablePointer<Int32>?) -> dispatch_qos_class_t
197 @available(*, unavailable, renamed:"DispatchQueue.after(self:when:execute:)")
198 public func dispatch_after(_ when: dispatch_time_t, _ queue: DispatchQueue, _ block: () -> Void)
203 @available(*, unavailable, renamed:"DispatchQueue.asynchronously(self:group:qos:flags:execute:)")
204 public func dispatch_barrier_async(_ queue: DispatchQueue, _ block: () -> Void)
209 @available(*, unavailable, renamed:"DispatchQueue.synchronously(self:flags:execute:)")
210 public func dispatch_barrier_sync(_ queue: DispatchQueue, _ block: @noescape () -> Void)
215 @available(*, unavailable, renamed:"DispatchQueue.setSpecific(self:key:value:)")
216 public func dispatch_queue_set_specific(_ queue: DispatchQueue, _ key: UnsafePointer<Void>, _ context: UnsafeMutablePointer<Void>?, _ destructor: (@convention(c) (UnsafeMutablePointer<Void>?) -> Void)?)
221 @available(*, unavailable, renamed:"DispatchQueue.getSpecific(self:key:)")
222 public func dispatch_queue_get_specific(_ queue: DispatchQueue, _ key: UnsafePointer<Void>) -> UnsafeMutablePointer<Void>?
227 @available(*, unavailable, renamed:"DispatchQueue.getSpecific(key:)")
228 public func dispatch_get_specific(_ key: UnsafePointer<Void>) -> UnsafeMutablePointer<Void>?
233 @available(*, unavailable, renamed:"dispatchPrecondition(_:)")
234 public func dispatch_assert_queue(_ queue: DispatchQueue)
239 @available(*, unavailable, renamed:"dispatchPrecondition(_:)")
240 public func dispatch_assert_queue_barrier(_ queue: DispatchQueue)
245 @available(*, unavailable, renamed:"dispatchPrecondition(_:)")
246 public func dispatch_assert_queue_not(_ queue: DispatchQueue)
251 @available(*, unavailable, renamed:"DispatchSemaphore.wait(self:timeout:)")
252 public func dispatch_semaphore_wait(_ dsema: DispatchSemaphore, _ timeout: dispatch_time_t) -> Int
257 @available(*, unavailable, renamed: "DispatchSemaphore.signal(self:)")
258 public func dispatch_semaphore_signal(_ dsema: DispatchSemaphore) -> Int
263 @available(*, unavailable, message:"Use DispatchSource class methods")
264 public func dispatch_source_create(_ type: dispatch_source_type_t, _ handle: UInt, _ mask: UInt, _ queue: DispatchQueue?) -> DispatchSource
269 @available(*, unavailable, renamed:"DispatchSource.setEventHandler(self:handler:)")
270 public func dispatch_source_set_event_handler(_ source: DispatchSource, _ handler: (() -> Void)?)
275 @available(*, unavailable, renamed:"DispatchSource.setCancelHandler(self:handler:)")
276 public func dispatch_source_set_cancel_handler(_ source: DispatchSource, _ handler: (() -> Void)?)
281 @available(*, unavailable, renamed:"DispatchSource.cancel(self:)")
282 public func dispatch_source_cancel(_ source: DispatchSource)
287 @available(*, unavailable, renamed:"getter:DispatchSource.isCancelled(self:)")
288 public func dispatch_source_testcancel(_ source: DispatchSource) -> Int
293 @available(*, unavailable, renamed:"getter:DispatchSource.handle(self:)")
294 public func dispatch_source_get_handle(_ source: DispatchSource) -> UInt
299 @available(*, unavailable, renamed:"getter:DispatchSource.mask(self:)")
300 public func dispatch_source_get_mask(_ source: DispatchSource) -> UInt
305 @available(*, unavailable, renamed:"getter:DispatchSource.data(self:)")
306 public func dispatch_source_get_data(_ source: DispatchSource) -> UInt
311 @available(*, unavailable, renamed:"DispatchUserDataAdd.mergeData(self:value:)")
312 public func dispatch_source_merge_data(_ source: DispatchSource, _ value: UInt)
317 @available(*, unavailable, renamed:"DispatchTimerSource.setTimer(self:start:interval:leeway:)")
318 public func dispatch_source_set_timer(_ source: DispatchSource, _ start: dispatch_time_t, _ interval: UInt64, _ leeway: UInt64)
323 @available(*, unavailable, renamed:"DispatchSource.setRegistrationHandler(self:handler:)")
324 public func dispatch_source_set_registration_handler(_ source: DispatchSource, _ handler: (() -> Void)?)
329 @available(*, unavailable, renamed:"DispatchTime.now()")
330 public func dispatch_time(_ when: dispatch_time_t, _ delta: Int64) -> dispatch_time_t
335 @available(*, unavailable, renamed:"DispatchWalltime.init(time:)")
336 public func dispatch_walltime(_ when: UnsafePointer<timespec>?, _ delta: Int64) -> dispatch_time_t
341 @available(*, unavailable, renamed: "DispatchQueue.GlobalAttributes.qosUserInitiated")
342 public var DISPATCH_QUEUE_PRIORITY_HIGH: Int {
346 @available(*, unavailable, renamed: "DispatchQueue.GlobalAttributes.qosDefault")
347 public var DISPATCH_QUEUE_PRIORITY_DEFAULT: Int {
351 @available(*, unavailable, renamed: "DispatchQueue.GlobalAttributes.qosUtility")
352 public var DISPATCH_QUEUE_PRIORITY_LOW: Int {
356 @available(*, unavailable, renamed: "DispatchQueue.GlobalAttributes.qosBackground")
357 public var DISPATCH_QUEUE_PRIORITY_BACKGROUND: Int {
361 @available(*, unavailable, renamed: "DispatchIO.StreamType.stream")
362 public var DISPATCH_IO_STREAM: Int {
366 @available(*, unavailable, renamed: "DispatchIO.StreamType.random")
367 public var DISPATCH_IO_RANDOM: Int {
371 @available(*, unavailable, renamed: "DispatchIO.CloseFlags.stop")
372 public var DISPATCH_IO_STOP: Int {
376 @available(*, unavailable, renamed: "DispatchIO.IntervalFlags.strictInterval")
377 public var DISPATCH_IO_STRICT_INTERVAL: Int {
381 @available(*, unavailable, renamed: "DispatchSource.MachSendEvent.dead")
382 public var DISPATCH_MACH_SEND_DEAD: Int {
386 @available(*, unavailable, renamed: "DispatchSource.MemoryPressureEvent.normal")
387 public var DISPATCH_MEMORYPRESSURE_NORMAL: Int {
391 @available(*, unavailable, renamed: "DispatchSource.MemoryPressureEvent.warning")
392 public var DISPATCH_MEMORYPRESSURE_WARN: Int {
396 @available(*, unavailable, renamed: "DispatchSource.MemoryPressureEvent.critical")
397 public var DISPATCH_MEMORYPRESSURE_CRITICAL: Int {
401 @available(*, unavailable, renamed: "DispatchSource.ProcessEvent.exit")
402 public var DISPATCH_PROC_EXIT: Int {
406 @available(*, unavailable, renamed: "DispatchSource.ProcessEvent.fork")
407 public var DISPATCH_PROC_FORK: Int {
411 @available(*, unavailable, renamed: "DispatchSource.ProcessEvent.exec")
412 public var DISPATCH_PROC_EXEC: Int {
416 @available(*, unavailable, renamed: "DispatchSource.ProcessEvent.signal")
417 public var DISPATCH_PROC_SIGNAL: Int {
421 @available(*, unavailable, renamed: "DispatchSource.TimerFlags.strict")
422 public var DISPATCH_TIMER_STRICT: Int {
426 @available(*, unavailable, renamed: "DispatchSource.FileSystemEvent.delete")
427 public var DISPATCH_VNODE_DELETE: Int {
431 @available(*, unavailable, renamed: "DispatchSource.FileSystemEvent.write")
432 public var DISPATCH_VNODE_WRITE: Int {
436 @available(*, unavailable, renamed: "DispatchSource.FileSystemEvent.extend")
437 public var DISPATCH_VNODE_EXTEND: Int {
441 @available(*, unavailable, renamed: "DispatchSource.FileSystemEvent.attrib")
442 public var DISPATCH_VNODE_ATTRIB: Int {
446 @available(*, unavailable, renamed: "DispatchSource.FileSystemEvent.link")
447 public var DISPATCH_VNODE_LINK: Int {
451 @available(*, unavailable, renamed: "DispatchSource.FileSystemEvent.rename")
452 public var DISPATCH_VNODE_RENAME: Int {
456 @available(*, unavailable, renamed: "DispatchSource.FileSystemEvent.revoke")
457 public var DISPATCH_VNODE_REVOKE: Int {
461 @available(*, unavailable, renamed: "DispatchSource.FileSystemEvent.funlock")
462 public var DISPATCH_VNODE_FUNLOCK: Int {
466 @available(*, unavailable, renamed: "DispatchTime.now()")
467 public var DISPATCH_TIME_NOW: Int {
471 @available(*, unavailable, renamed: "DispatchTime.distantFuture")
472 public var DISPATCH_TIME_FOREVER: Int {