IOFireWireIRMAllocation.h [plain text]
#ifndef _IOKIT_IOFIREWIREIRMALLOCATION_H
#define _IOKIT_IOFIREWIREIRMALLOCATION_H
#include <libkern/c++/OSObject.h>
class IOFireWireController;
class IOFireWireIRMAllocation : public OSObject
{
friend class IOFireWireController;
OSDeclareDefaultStructors(IOFireWireIRMAllocation)
public:
typedef IOReturn (*AllocationLostNotificationProc)(void* refCon, class IOFireWireIRMAllocation* allocation);
virtual bool init( IOFireWireController * control,
Boolean releaseIRMResourcesOnFree = true,
AllocationLostNotificationProc allocationLostProc = NULL,
void *pLostProcRefCon = NULL);
virtual void setReleaseIRMResourcesOnFree(Boolean doRelease);
virtual IOReturn allocateIsochResources(UInt8 isochChannel, UInt32 bandwidthUnits);
virtual IOReturn deallocateIsochResources(void);
virtual Boolean areIsochResourcesAllocated(UInt8 *pAllocatedIsochChannel, UInt32 *pAllocatedBandwidthUnits);
virtual void * GetRefCon(void);
virtual void SetRefCon(void* refCon);
virtual void release() const;
protected:
struct ExpansionData { };
ExpansionData *reserved;
virtual void free( void );
virtual void handleBusReset(UInt32 generation);
virtual void failedToRealloc(void);
virtual UInt32 getAllocationGeneration(void);
static void threadFunc( void * arg );
private:
AllocationLostNotificationProc fAllocationLostProc;
void *fLostProcRefCon;
Boolean fReleaseIRMResourcesOnFree;
UInt8 fIsochChannel;
UInt32 fBandwidthUnits;
UInt32 fAllocationGeneration;
IORecursiveLock *fLock ;
IOFireWireController *fControl;
Boolean isAllocated;
OSMetaClassDeclareReservedUnused(IOFireWireIRMAllocation, 0);
OSMetaClassDeclareReservedUnused(IOFireWireIRMAllocation, 1);
OSMetaClassDeclareReservedUnused(IOFireWireIRMAllocation, 2);
OSMetaClassDeclareReservedUnused(IOFireWireIRMAllocation, 3);
OSMetaClassDeclareReservedUnused(IOFireWireIRMAllocation, 4);
OSMetaClassDeclareReservedUnused(IOFireWireIRMAllocation, 5);
OSMetaClassDeclareReservedUnused(IOFireWireIRMAllocation, 6);
OSMetaClassDeclareReservedUnused(IOFireWireIRMAllocation, 7);
};
#endif // _IOKIT_IOFIREWIREIRMALLOCATION_H