1*8d741a5dSApple OSS Distributions/* 2*8d741a5dSApple OSS Distributions * Copyright (c) 2019-2019 Apple Inc. All rights reserved. 3*8d741a5dSApple OSS Distributions * 4*8d741a5dSApple OSS Distributions * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ 5*8d741a5dSApple OSS Distributions * 6*8d741a5dSApple OSS Distributions * This file contains Original Code and/or Modifications of Original Code 7*8d741a5dSApple OSS Distributions * as defined in and that are subject to the Apple Public Source License 8*8d741a5dSApple OSS Distributions * Version 2.0 (the 'License'). You may not use this file except in 9*8d741a5dSApple OSS Distributions * compliance with the License. The rights granted to you under the License 10*8d741a5dSApple OSS Distributions * may not be used to create, or enable the creation or redistribution of, 11*8d741a5dSApple OSS Distributions * unlawful or unlicensed copies of an Apple operating system, or to 12*8d741a5dSApple OSS Distributions * circumvent, violate, or enable the circumvention or violation of, any 13*8d741a5dSApple OSS Distributions * terms of an Apple operating system software license agreement. 14*8d741a5dSApple OSS Distributions * 15*8d741a5dSApple OSS Distributions * Please obtain a copy of the License at 16*8d741a5dSApple OSS Distributions * http://www.opensource.apple.com/apsl/ and read it before using this file. 17*8d741a5dSApple OSS Distributions * 18*8d741a5dSApple OSS Distributions * The Original Code and all software distributed under the License are 19*8d741a5dSApple OSS Distributions * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER 20*8d741a5dSApple OSS Distributions * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, 21*8d741a5dSApple OSS Distributions * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, 22*8d741a5dSApple OSS Distributions * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. 23*8d741a5dSApple OSS Distributions * Please see the License for the specific language governing rights and 24*8d741a5dSApple OSS Distributions * limitations under the License. 25*8d741a5dSApple OSS Distributions * 26*8d741a5dSApple OSS Distributions * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ 27*8d741a5dSApple OSS Distributions */ 28*8d741a5dSApple OSS Distributions 29*8d741a5dSApple OSS Distributions#if !__IIG 30*8d741a5dSApple OSS Distributions#if KERNEL 31*8d741a5dSApple OSS Distributions#include <libkern/c++/OSObject.h> 32*8d741a5dSApple OSS Distributions#endif 33*8d741a5dSApple OSS Distributions#endif 34*8d741a5dSApple OSS Distributions 35*8d741a5dSApple OSS Distributions#ifndef _IOKIT_UOSOBJECT_H 36*8d741a5dSApple OSS Distributions#define _IOKIT_UOSOBJECT_H 37*8d741a5dSApple OSS Distributions 38*8d741a5dSApple OSS Distributions#if !KERNEL 39*8d741a5dSApple OSS Distributions#include <stddef.h> 40*8d741a5dSApple OSS Distributions#include <stdint.h> 41*8d741a5dSApple OSS Distributions#include <DriverKit/IOReturn.h> 42*8d741a5dSApple OSS Distributions#if DRIVERKIT_PRIVATE 43*8d741a5dSApple OSS Distributions#include <mach/port.h> 44*8d741a5dSApple OSS Distributions#endif /* DRIVERKIT_PRIVATE */ 45*8d741a5dSApple OSS Distributions#if !__IIG 46*8d741a5dSApple OSS Distributions#include <string.h> 47*8d741a5dSApple OSS Distributions#include <DriverKit/OSMetaClass.h> 48*8d741a5dSApple OSS Distributions#endif /* !__IIG */ 49*8d741a5dSApple OSS Distributionsclass OSObject; 50*8d741a5dSApple OSS Distributionstypedef OSObject * OSObjectPtr; 51*8d741a5dSApple OSS Distributions#endif /* !KERNEL */ 52*8d741a5dSApple OSS Distributions 53*8d741a5dSApple OSS Distributions#if !__IIG_ATTRIBUTES_DEFINED__ 54*8d741a5dSApple OSS Distributions 55*8d741a5dSApple OSS Distributions#define __IIG_ATTRIBUTES_DEFINED__ 1 56*8d741a5dSApple OSS Distributions 57*8d741a5dSApple OSS Distributions#if __IIG || __DOCUMENTATION__ 58*8d741a5dSApple OSS Distributions 59*8d741a5dSApple OSS Distributions#define IIG_KERNEL __attribute__((annotate("kernel"))) 60*8d741a5dSApple OSS Distributions#define IIG_NATIVE __attribute__((annotate("native"))) 61*8d741a5dSApple OSS Distributions#define IIG_LOCAL __attribute__((annotate("local"))) 62*8d741a5dSApple OSS Distributions#define IIG_LOCALONLY __attribute__((annotate("localonly"))) 63*8d741a5dSApple OSS Distributions#define IIG_REMOTE __attribute__((annotate("remote"))) 64*8d741a5dSApple OSS Distributions#define IIG_LOCALHOST __attribute__((annotate("localhost"))) 65*8d741a5dSApple OSS Distributions#define IIG_INVOKEREPLY __attribute__((annotate("invokereply"))) 66*8d741a5dSApple OSS Distributions#define IIG_REPLY __attribute__((annotate("reply"))) 67*8d741a5dSApple OSS Distributions#define IIG_PORTMAKESEND __attribute__((annotate("MACH_MSG_TYPE_MAKE_SEND"))) 68*8d741a5dSApple OSS Distributions#define IIG_PORTCOPYSEND __attribute__((annotate("MACH_MSG_TYPE_COPY_SEND"))) 69*8d741a5dSApple OSS Distributions#define IIG_TARGET __attribute__((annotate("target"))) 70*8d741a5dSApple OSS Distributions#define IIG_TYPE(p) __attribute__((annotate("type=" # p))) 71*8d741a5dSApple OSS Distributions//#define IIG_ARRAY(maxcount) __attribute__((annotate(# maxcount), annotate("array"))) 72*8d741a5dSApple OSS Distributions#define IIG_EXTENDS(cls) __attribute__((annotate("extends=" # cls))) 73*8d741a5dSApple OSS Distributions//#define IIG_INTERFACE __attribute__((annotate("interface"))) 74*8d741a5dSApple OSS Distributions//#define IIG_IMPLEMENTS(i) void __implements(i *); 75*8d741a5dSApple OSS Distributions#define IIG_QUEUENAME(name) __attribute__((annotate("queuename=" # name))) 76*8d741a5dSApple OSS Distributions#define IIG_SERIALIZABLE __attribute__((annotate("serializable"))) 77*8d741a5dSApple OSS Distributions#define IIG_CONCRETE __attribute__((annotate("concrete"))) 78*8d741a5dSApple OSS Distributions 79*8d741a5dSApple OSS Distributions#if __IIG 80*8d741a5dSApple OSS Distributions#define KERNEL IIG_KERNEL 81*8d741a5dSApple OSS Distributions#endif /* __IIG */ 82*8d741a5dSApple OSS Distributions#define NATIVE IIG_NATIVE 83*8d741a5dSApple OSS Distributions#define LOCAL IIG_LOCAL 84*8d741a5dSApple OSS Distributions#define LOCALONLY IIG_LOCALONLY 85*8d741a5dSApple OSS Distributions#define REMOTE IIG_REMOTE 86*8d741a5dSApple OSS Distributions#define LOCALHOST IIG_LOCALHOST 87*8d741a5dSApple OSS Distributions#define INVOKEREPLY IIG_INVOKEREPLY 88*8d741a5dSApple OSS Distributions#define REPLY IIG_REPLY 89*8d741a5dSApple OSS Distributions#define PORTMAKESEND IIG_PORTMAKESEND 90*8d741a5dSApple OSS Distributions#define PORTCOPYSEND IIG_PORTCOPYSEND 91*8d741a5dSApple OSS Distributions#define TARGET IIG_TARGET 92*8d741a5dSApple OSS Distributions#define TYPE(p) IIG_TYPE(p) 93*8d741a5dSApple OSS Distributions//#define ARRAY(maxcount) IIG_ARRAY(maxcount) 94*8d741a5dSApple OSS Distributions#define EXTENDS(cls) IIG_EXTENDS(cls) 95*8d741a5dSApple OSS Distributions//#define INTERFACE IIG_INTERFACE 96*8d741a5dSApple OSS Distributions//#define IMPLEMENTS(i) IIG_IMPLEMENTS(i) 97*8d741a5dSApple OSS Distributions#define QUEUENAME(name) IIG_QUEUENAME(name) 98*8d741a5dSApple OSS Distributions 99*8d741a5dSApple OSS Distributions#else /* __IIG || __DOCUMENTATION__ */ 100*8d741a5dSApple OSS Distributions 101*8d741a5dSApple OSS Distributions#define IIG_KERNEL 102*8d741a5dSApple OSS Distributions#define IIG_NATIVE 103*8d741a5dSApple OSS Distributions#define IIG_LOCAL 104*8d741a5dSApple OSS Distributions#define IIG_LOCALONLY 105*8d741a5dSApple OSS Distributions#define IIG_REMOTE 106*8d741a5dSApple OSS Distributions#define IIG_LOCALHOST 107*8d741a5dSApple OSS Distributions#define IIG_INVOKEREPLY 108*8d741a5dSApple OSS Distributions#define IIG_REPLY 109*8d741a5dSApple OSS Distributions#define IIG_PORTMAKESEND 110*8d741a5dSApple OSS Distributions#define IIG_PORTCOPYSEND 111*8d741a5dSApple OSS Distributions#define IIG_TARGET 112*8d741a5dSApple OSS Distributions#define IIG_TYPE(p) 113*8d741a5dSApple OSS Distributions//#define IIG_ARRAY(maxcount) 114*8d741a5dSApple OSS Distributions#define IIG_EXTENDS(cls) 115*8d741a5dSApple OSS Distributions//#define IIG_INTERFACE 116*8d741a5dSApple OSS Distributions//#define IIG_IMPLEMENTS(i) 117*8d741a5dSApple OSS Distributions#define IIG_QUEUENAME(name) 118*8d741a5dSApple OSS Distributions#define IIG_SERIALIZABLE 119*8d741a5dSApple OSS Distributions 120*8d741a5dSApple OSS Distributions#endif /* __IIG || __DOCUMENTATION__ */ 121*8d741a5dSApple OSS Distributions 122*8d741a5dSApple OSS Distributions#endif /* __IIG_ATTRIBUTES_DEFINED__ */ 123*8d741a5dSApple OSS Distributions 124*8d741a5dSApple OSS Distributions 125*8d741a5dSApple OSS Distributions#if !__IIG 126*8d741a5dSApple OSS Distributions#if KERNEL 127*8d741a5dSApple OSS Distributionstypedef OSObject OSContainer; 128*8d741a5dSApple OSS Distributions#else /* KERNEL */ 129*8d741a5dSApple OSS Distributionsclass IIG_SERIALIZABLE OSContainer; 130*8d741a5dSApple OSS Distributions#endif /* KERNEL */ 131*8d741a5dSApple OSS Distributions#else /* !__IIG */ 132*8d741a5dSApple OSS Distributionsclass IIG_SERIALIZABLE OSContainer; 133*8d741a5dSApple OSS Distributions#endif /* !__IIG */ 134*8d741a5dSApple OSS Distributions 135*8d741a5dSApple OSS Distributions/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ 136*8d741a5dSApple OSS Distributions 137*8d741a5dSApple OSS Distributions/* 138*8d741a5dSApple OSS Distributions * DRIVERKIT_ macros below can be used to describe the ownership semantics 139*8d741a5dSApple OSS Distributions * of functions handling subclasses of OSObject. 140*8d741a5dSApple OSS Distributions * The attributes propagate with inheritance, but can be overriden. 141*8d741a5dSApple OSS Distributions * New versions of the Clang Static Analyzer can use this knowledge to 142*8d741a5dSApple OSS Distributions * check the code for leaks or uses-after-free. 143*8d741a5dSApple OSS Distributions */ 144*8d741a5dSApple OSS Distributions 145*8d741a5dSApple OSS Distributions#ifndef KERNEL 146*8d741a5dSApple OSS Distributions/* 147*8d741a5dSApple OSS Distributions * By default, methods returning OSObjects are assumed to have the following 148*8d741a5dSApple OSS Distributions * owneship semantics: 149*8d741a5dSApple OSS Distributions * - Functions and methods that have "Get" in their name are assumed to be 150*8d741a5dSApple OSS Distributions * getters. They return at "+0" and the caller is not responsible for releasing 151*8d741a5dSApple OSS Distributions * the returned object. 152*8d741a5dSApple OSS Distributions * 153*8d741a5dSApple OSS Distributions * - All other methods are assumed to return at "+1", and the caller is 154*8d741a5dSApple OSS Distributions * responsible for releasing the returned object. 155*8d741a5dSApple OSS Distributions * 156*8d741a5dSApple OSS Distributions * The semantics implied by the naming convention described above can be 157*8d741a5dSApple OSS Distributions * overriden using either DRIVERKIT_RETURNS_RETAINED or 158*8d741a5dSApple OSS Distributions * DRIVERKIT_RETURNS_NOT_RETAINED attribute applied to a function. 159*8d741a5dSApple OSS Distributions * In the former case, it stipulates that the function is returning at "+1", 160*8d741a5dSApple OSS Distributions * and in the latter case "+0". 161*8d741a5dSApple OSS Distributions * DRIVERKIT_RETURNS_RETAINED and DRIVERKIT_RETURNS_NOT_RETAINED attributes 162*8d741a5dSApple OSS Distributions * can be also applied to out parameters, in which case they specify 163*8d741a5dSApple OSS Distributions * that an out parameter is written into at +1 or +0 respectively. 164*8d741a5dSApple OSS Distributions * Behavior of out parameters of non-void functions can be additionally 165*8d741a5dSApple OSS Distributions * customized via annotations that explain how a function returns a retained 166*8d741a5dSApple OSS Distributions * or a non-retained value through its out-parameter depending on its 167*8d741a5dSApple OSS Distributions * return value: DRIVERKIT_RETURNS_RETAINED_ON_ZERO and 168*8d741a5dSApple OSS Distributions * DRIVERKIT_RETURNS_RETAINED_ON_NONZERO. 169*8d741a5dSApple OSS Distributions */ 170*8d741a5dSApple OSS Distributions#if __has_attribute(os_returns_retained) 171*8d741a5dSApple OSS Distributions#define DRIVERKIT_RETURNS_RETAINED __attribute__((os_returns_retained)) 172*8d741a5dSApple OSS Distributions#else 173*8d741a5dSApple OSS Distributions#define DRIVERKIT_RETURNS_RETAINED 174*8d741a5dSApple OSS Distributions#endif 175*8d741a5dSApple OSS Distributions#if __has_attribute(os_returns_not_retained) 176*8d741a5dSApple OSS Distributions#define DRIVERKIT_RETURNS_NOT_RETAINED __attribute__((os_returns_not_retained)) 177*8d741a5dSApple OSS Distributions#else 178*8d741a5dSApple OSS Distributions#define DRIVERKIT_RETURNS_NOT_RETAINED 179*8d741a5dSApple OSS Distributions#endif 180*8d741a5dSApple OSS Distributions 181*8d741a5dSApple OSS Distributions/* 182*8d741a5dSApple OSS Distributions * DRIVERKIT_CONSUMED attribute can be applied to parameters. 183*8d741a5dSApple OSS Distributions * It specifies that this function call would consume the reference to the 184*8d741a5dSApple OSS Distributions * annotated parameter. 185*8d741a5dSApple OSS Distributions */ 186*8d741a5dSApple OSS Distributions#if __has_attribute(os_consumed) 187*8d741a5dSApple OSS Distributions#define DRIVERKIT_CONSUMED __attribute__((os_consumed)) 188*8d741a5dSApple OSS Distributions#else 189*8d741a5dSApple OSS Distributions#define DRIVERKIT_CONSUMED 190*8d741a5dSApple OSS Distributions#endif 191*8d741a5dSApple OSS Distributions 192*8d741a5dSApple OSS Distributions/* 193*8d741a5dSApple OSS Distributions * DRIVERKIT_CONSUMES_THIS attribute can be applied to C++ methods. 194*8d741a5dSApple OSS Distributions * It specifies that this method call consumes a reference to "this" (e.g. 195*8d741a5dSApple OSS Distributions * by storing a reference to "this" in a passed parameter). 196*8d741a5dSApple OSS Distributions */ 197*8d741a5dSApple OSS Distributions#if __has_attribute(os_consumes_this) 198*8d741a5dSApple OSS Distributions#define DRIVERKIT_CONSUMES_THIS __attribute__((os_consumes_this)) 199*8d741a5dSApple OSS Distributions#else 200*8d741a5dSApple OSS Distributions#define DRIVERKIT_CONSUMES_THIS 201*8d741a5dSApple OSS Distributions#endif 202*8d741a5dSApple OSS Distributions 203*8d741a5dSApple OSS Distributions/* 204*8d741a5dSApple OSS Distributions * DRIVERKIT_RETURNS_RETAINED_ON_ZERO is an attribute applicable to out 205*8d741a5dSApple OSS Distributions * parameters. 206*8d741a5dSApple OSS Distributions * It specifies that an out parameter at +1 is written into an argument iff 207*8d741a5dSApple OSS Distributions * the function returns a zero return value. 208*8d741a5dSApple OSS Distributions */ 209*8d741a5dSApple OSS Distributions#if __has_attribute(os_returns_retained_on_zero) 210*8d741a5dSApple OSS Distributions#define DRIVERKIT_RETURNS_RETAINED_ON_ZERO __attribute__((os_returns_retained_on_zero)) 211*8d741a5dSApple OSS Distributions#else 212*8d741a5dSApple OSS Distributions#define DRIVERKIT_RETURNS_RETAINED_ON_ZERO 213*8d741a5dSApple OSS Distributions#endif 214*8d741a5dSApple OSS Distributions 215*8d741a5dSApple OSS Distributions/* 216*8d741a5dSApple OSS Distributions * DRIVERKIT_RETURNS_RETAINED_ON_NON_ZERO is an attribute applicable to out 217*8d741a5dSApple OSS Distributions * parameters. 218*8d741a5dSApple OSS Distributions * It specifies that an out parameter at +1 is written into an argument iff 219*8d741a5dSApple OSS Distributions * the function returns a non-zero return value. 220*8d741a5dSApple OSS Distributions */ 221*8d741a5dSApple OSS Distributions#if __has_attribute(os_returns_retained_on_non_zero) 222*8d741a5dSApple OSS Distributions#define DRIVERKIT_RETURNS_RETAINED_ON_NONZERO __attribute__((os_returns_retained_on_non_zero)) 223*8d741a5dSApple OSS Distributions#else 224*8d741a5dSApple OSS Distributions#define DRIVERKIT_RETURNS_RETAINED_ON_NONZERO 225*8d741a5dSApple OSS Distributions#endif 226*8d741a5dSApple OSS Distributions 227*8d741a5dSApple OSS Distributions 228*8d741a5dSApple OSS Distributions/* 229*8d741a5dSApple OSS Distributions * Macros below are equivalent to their DRIVERKIT_ counterparts. 230*8d741a5dSApple OSS Distributions * They are provided for source-compatibility with IOKit code so they can 231*8d741a5dSApple OSS Distributions * be used in code that gets compiled for both platforms. 232*8d741a5dSApple OSS Distributions */ 233*8d741a5dSApple OSS Distributions#define LIBKERN_RETURNS_RETAINED DRIVERKIT_RETURNS_RETAINED 234*8d741a5dSApple OSS Distributions#define LIBKERN_RETURNS_NOT_RETAINED DRIVERKIT_RETURNS_NOT_RETAINED 235*8d741a5dSApple OSS Distributions#define LIBKERN_CONSUMED DRIVERKIT_CONSUMED 236*8d741a5dSApple OSS Distributions#define LIBKERN_CONSUMES_THIS DRIVERKIT_CONSUMES_THIS 237*8d741a5dSApple OSS Distributions#define LIBKERN_RETURNS_RETAINED_ON_ZERO DRIVERKIT_RETURNS_RETAINED_ON_ZERO 238*8d741a5dSApple OSS Distributions#define LIBKERN_RETURNS_RETAINED_ON_NONZERO DRIVERKIT_RETURNS_RETAINED_ON_NONZERO 239*8d741a5dSApple OSS Distributions 240*8d741a5dSApple OSS Distributions#endif /* !defined(KERNEL) */ 241*8d741a5dSApple OSS Distributions 242*8d741a5dSApple OSS Distributions/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ 243*8d741a5dSApple OSS Distributions 244*8d741a5dSApple OSS Distributions 245*8d741a5dSApple OSS Distributionsclass IIG_SERIALIZABLE OSData; 246*8d741a5dSApple OSS Distributionsclass IIG_SERIALIZABLE OSNumber; 247*8d741a5dSApple OSS Distributionsclass IIG_SERIALIZABLE OSString; 248*8d741a5dSApple OSS Distributionsclass IIG_SERIALIZABLE OSBoolean; 249*8d741a5dSApple OSS Distributionsclass IIG_SERIALIZABLE OSDictionary; 250*8d741a5dSApple OSS Distributionsclass IIG_SERIALIZABLE OSArray; 251*8d741a5dSApple OSS Distributionsclass IIG_SERIALIZABLE OSSet; 252*8d741a5dSApple OSS Distributionsclass IIG_SERIALIZABLE OSOrderedSet; 253*8d741a5dSApple OSS Distributions 254*8d741a5dSApple OSS Distributionsclass OSMetaClass; 255*8d741a5dSApple OSS Distributionsclass IODispatchQueue; 256*8d741a5dSApple OSS Distributionstypedef char IODispatchQueueName[256]; 257*8d741a5dSApple OSS Distributions 258*8d741a5dSApple OSS Distributions#if __IIG 259*8d741a5dSApple OSS Distributionsclass OSMetaClassBase 260*8d741a5dSApple OSS Distributions{ 261*8d741a5dSApple OSS Distributions virtual const OSMetaClass * 262*8d741a5dSApple OSS Distributions getMetaClass() const LOCALONLY; 263*8d741a5dSApple OSS Distributions 264*8d741a5dSApple OSS Distributions virtual void 265*8d741a5dSApple OSS Distributions retain() const LOCALONLY; 266*8d741a5dSApple OSS Distributions 267*8d741a5dSApple OSS Distributions virtual void 268*8d741a5dSApple OSS Distributions release() const LOCALONLY; 269*8d741a5dSApple OSS Distributions 270*8d741a5dSApple OSS Distributions virtual bool 271*8d741a5dSApple OSS Distributions isEqualTo(const OSMetaClassBase * anObject) const LOCALONLY; 272*8d741a5dSApple OSS Distributions}; 273*8d741a5dSApple OSS Distributions#endif /* __IIG */ 274*8d741a5dSApple OSS Distributions 275*8d741a5dSApple OSS Distributions 276*8d741a5dSApple OSS Distributions/*! 277*8d741a5dSApple OSS Distributions@iig implementation 278*8d741a5dSApple OSS Distributions#include <DriverKit/IODispatchQueue.h> 279*8d741a5dSApple OSS Distributions@iig end 280*8d741a5dSApple OSS Distributions*/ 281*8d741a5dSApple OSS Distributions 282*8d741a5dSApple OSS Distributionsclass OSObject : public OSMetaClassBase 283*8d741a5dSApple OSS Distributions{ 284*8d741a5dSApple OSS Distributionspublic: 285*8d741a5dSApple OSS Distributions 286*8d741a5dSApple OSS Distributions virtual bool 287*8d741a5dSApple OSS Distributions init() LOCALONLY; 288*8d741a5dSApple OSS Distributions 289*8d741a5dSApple OSS Distributions virtual void 290*8d741a5dSApple OSS Distributions free() LOCALONLY; 291*8d741a5dSApple OSS Distributions 292*8d741a5dSApple OSS Distributions virtual void 293*8d741a5dSApple OSS Distributions retain() const override; 294*8d741a5dSApple OSS Distributions 295*8d741a5dSApple OSS Distributions virtual void 296*8d741a5dSApple OSS Distributions release() const override; 297*8d741a5dSApple OSS Distributions 298*8d741a5dSApple OSS Distributions virtual kern_return_t 299*8d741a5dSApple OSS Distributions SetDispatchQueue( 300*8d741a5dSApple OSS Distributions const IODispatchQueueName name, 301*8d741a5dSApple OSS Distributions IODispatchQueue * queue) KERNEL = 0; 302*8d741a5dSApple OSS Distributions 303*8d741a5dSApple OSS Distributions virtual kern_return_t 304*8d741a5dSApple OSS Distributions CopyDispatchQueue( 305*8d741a5dSApple OSS Distributions const IODispatchQueueName name, 306*8d741a5dSApple OSS Distributions IODispatchQueue ** queue) KERNEL = 0; 307*8d741a5dSApple OSS Distributions}; 308*8d741a5dSApple OSS Distributions 309*8d741a5dSApple OSS Distributions#define DEFN(classname, name) \ 310*8d741a5dSApple OSS Distributionsname ## _Impl(classname ## _ ## name ## _Args) 311*8d741a5dSApple OSS Distributions 312*8d741a5dSApple OSS Distributions/* 313*8d741a5dSApple OSS Distributions * Use of the IMPL macro is discouraged and should be replaced by a normal c++ 314*8d741a5dSApple OSS Distributions * method implementation (with the all method arguments) and the name of the method 315*8d741a5dSApple OSS Distributions * given a suffix '_Impl' 316*8d741a5dSApple OSS Distributions */ 317*8d741a5dSApple OSS Distributions 318*8d741a5dSApple OSS Distributions#define IMPL(classname, name) \ 319*8d741a5dSApple OSS Distributionsclassname :: DEFN(classname, name) 320*8d741a5dSApple OSS Distributions 321*8d741a5dSApple OSS Distributions/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ 322*8d741a5dSApple OSS Distributions 323*8d741a5dSApple OSS Distributions#endif /* ! _IOKIT_UOSOBJECT_H */ 324