X-Git-Url: https://git.saurik.com/apple/xnu.git/blobdiff_plain/0a7de7458d150b5d4dffc935ba399be265ef0a1a..HEAD:/iokit/IOKit/IOMemoryCursor.h diff --git a/iokit/IOKit/IOMemoryCursor.h b/iokit/IOKit/IOMemoryCursor.h index 99f9dc814..22eea326e 100644 --- a/iokit/IOKit/IOMemoryCursor.h +++ b/iokit/IOKit/IOMemoryCursor.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998-2000 Apple Computer, Inc. All rights reserved. + * Copyright (c) 1998-2019 Apple Inc. All rights reserved. * * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ * @@ -29,6 +29,7 @@ #define _IOMEMORYCURSOR_H #include +#include #include class IOMemoryDescriptor; @@ -54,7 +55,7 @@ class IOMemoryDescriptor; */ class IOMemoryCursor : public OSObject { - OSDeclareDefaultStructors(IOMemoryCursor) + OSDeclareDefaultStructors(IOMemoryCursor); public: /*! @@ -111,7 +112,7 @@ public: * @param alignment Alignment restrictions on output physical addresses. Not currently implemented. Defaults to single byte alignment. * @result Returns a new memory cursor if successfully created and initialized, 0 otherwise. */ - static IOMemoryCursor * + static OSPtr withSpecification(SegmentFunction outSegFunc, IOPhysicalLength maxSegmentSize = 0, IOPhysicalLength maxTransferSize = 0, @@ -148,7 +149,7 @@ public: void * segments, UInt32 maxSegments, UInt32 maxTransferSize = 0, - IOByteCount *transferSize = 0); + IOByteCount *transferSize = NULL); }; /************************ class IONaturalMemoryCursor ************************/ @@ -161,7 +162,7 @@ public: */ class IONaturalMemoryCursor : public IOMemoryCursor { - OSDeclareDefaultStructors(IONaturalMemoryCursor) + OSDeclareDefaultStructors(IONaturalMemoryCursor); public: /*! @function outputSegment @@ -187,7 +188,7 @@ public: * @param alignment Alignment restrictions on output physical addresses. Not currently implemented. Defaults to single byte alignment. * @result Returns a new memory cursor if successfully created and initialized, 0 otherwise. */ - static IONaturalMemoryCursor * + static OSPtr withSpecification(IOPhysicalLength maxSegmentSize, IOPhysicalLength maxTransferSize, IOPhysicalLength alignment = 1); @@ -221,7 +222,7 @@ public: PhysicalSegment *segments, UInt32 maxSegments, UInt32 inMaxTransferSize = 0, - IOByteCount *transferSize = 0) + IOByteCount *transferSize = NULL) { return genPhysicalSegments(descriptor, fromPosition, segments, maxSegments, inMaxTransferSize, transferSize); @@ -237,7 +238,7 @@ public: */ class IOBigMemoryCursor : public IOMemoryCursor { - OSDeclareDefaultStructors(IOBigMemoryCursor) + OSDeclareDefaultStructors(IOBigMemoryCursor); public: /*! @function outputSegment @@ -263,7 +264,7 @@ public: * @param alignment Alignment restrictions on output physical addresses. Not currently implemented. Defaults to single byte alignment. * @result Returns a new memory cursor if successfully created and initialized, 0 otherwise. */ - static IOBigMemoryCursor * + static OSPtr withSpecification(IOPhysicalLength maxSegmentSize, IOPhysicalLength maxTransferSize, IOPhysicalLength alignment = 1); @@ -298,7 +299,7 @@ public: PhysicalSegment * segments, UInt32 maxSegments, UInt32 inMaxTransferSize = 0, - IOByteCount * transferSize = 0) + IOByteCount * transferSize = NULL) { return genPhysicalSegments(descriptor, fromPosition, segments, maxSegments, inMaxTransferSize, transferSize); @@ -314,7 +315,7 @@ public: */ class IOLittleMemoryCursor : public IOMemoryCursor { - OSDeclareDefaultStructors(IOLittleMemoryCursor) + OSDeclareDefaultStructors(IOLittleMemoryCursor); public: /*! @function outputSegment @@ -339,7 +340,7 @@ public: * @param alignment Alignment restrictions on output physical addresses. Not currently implemented. Defaults to single byte alignment. * @result Returns a new memory cursor if successfully created and initialized, 0 otherwise. */ - static IOLittleMemoryCursor * + static OSPtr withSpecification(IOPhysicalLength maxSegmentSize, IOPhysicalLength maxTransferSize, IOPhysicalLength alignment = 1); @@ -373,7 +374,7 @@ public: PhysicalSegment * segments, UInt32 maxSegments, UInt32 inMaxTransferSize = 0, - IOByteCount * transferSize = 0) + IOByteCount * transferSize = NULL) { return genPhysicalSegments(descriptor, fromPosition, segments, maxSegments, inMaxTransferSize, transferSize);