/*
- * Copyright (c) 1998-2000 Apple Computer, Inc. All rights reserved.
+ * Copyright (c) 1998-2016 Apple Inc. All rights reserved.
*
* @APPLE_OSREFERENCE_LICENSE_HEADER_START@
*
@abstract Provides a basis for communication between client applications and I/O Kit objects.
*/
-
class IOUserClient : public IOService
{
OSDeclareAbstractStructors(IOUserClient)
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,
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,
@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,
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 );