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