X-Git-Url: https://git.saurik.com/apple/xnu.git/blobdiff_plain/fe8ab488e9161c46dd9885d58fc52996dc0249ff..cc8bc92ae4a8e9f1a1ab61bf83d34ad8150b3405:/iokit/IOKit/IOUserClient.h?ds=sidebyside diff --git a/iokit/IOKit/IOUserClient.h b/iokit/IOKit/IOUserClient.h index c50e3ead9..cce1695b9 100644 --- a/iokit/IOKit/IOUserClient.h +++ b/iokit/IOKit/IOUserClient.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998-2000 Apple Computer, Inc. All rights reserved. + * Copyright (c) 1998-2016 Apple Inc. All rights reserved. * * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ * @@ -173,7 +173,6 @@ enum { @abstract Provides a basis for communication between client applications and I/O Kit objects. */ - class IOUserClient : public IOService { OSDeclareAbstractStructors(IOUserClient) @@ -201,14 +200,25 @@ protected: bool reserve(); #ifdef XNU_KERNEL_PRIVATE + public: -#else -private: -#endif OSSet * mappings; UInt8 sharedInstance; - UInt8 __reservedA[3]; - void * __reserved[7]; + UInt8 closed; + UInt8 __ipcFinal; + UInt8 __reservedA[1]; + volatile SInt32 __ipc; + queue_head_t owners; +#if __LP64__ + void * __reserved[5]; +#else + void * __reserved[4]; +#endif + +#else /* XNU_KERNEL_PRIVATE */ +private: + void * __reserved[9]; +#endif /* XNU_KERNEL_PRIVATE */ public: virtual IOReturn externalMethod( uint32_t selector, IOExternalMethodArguments * arguments, @@ -241,15 +251,20 @@ private: OSMetaClassDeclareReservedUnused(IOUserClient, 15); #ifdef XNU_KERNEL_PRIVATE + /* Available within xnu source only */ public: static void initialize( void ); static void destroyUserReferences( OSObject * obj ); + static bool finalizeUserReferences( OSObject * obj ); IOMemoryMap * mapClientMemory64( IOOptionBits type, task_t task, IOOptionBits mapFlags = kIOMapAnywhere, mach_vm_address_t atAddress = 0 ); -#endif + IOReturn registerOwner(task_t task); + void noMoreSenders(void); + +#endif /* XNU_KERNEL_PRIVATE */ protected: static IOReturn sendAsyncResult(OSAsyncReference reference, @@ -304,13 +319,13 @@ public: @function releaseNotificationPort @abstract Release the mach_port_t passed to registerNotificationPort(). @discussion The mach_port_t passed to the registerNotificationPort() methods should be released to balance each call to registerNotificationPort(). Behavior is undefined if these calls are not correctly balanced. - @param reference The mach_port_t argument previously passed to the subclass implementation of registerNotificationPort(). + @param port The mach_port_t argument previously passed to the subclass implementation of registerNotificationPort(). @result A return code. */ static IOReturn releaseNotificationPort(mach_port_t port); - virtual bool init(); - virtual bool init( OSDictionary * dictionary ); + virtual bool init() APPLE_KEXT_OVERRIDE; + virtual bool init( OSDictionary * dictionary ) APPLE_KEXT_OVERRIDE; // Currently ignores the all args, just passes up to IOService::init() virtual bool initWithTask( task_t owningTask, void * securityToken, UInt32 type, @@ -319,7 +334,7 @@ public: virtual bool initWithTask( task_t owningTask, void * securityToken, UInt32 type); - virtual void free(); + virtual void free() APPLE_KEXT_OVERRIDE; virtual IOReturn clientClose( void ); virtual IOReturn clientDied( void );