]> git.saurik.com Git - apple/xnu.git/blobdiff - iokit/Kernel/IOSubMemoryDescriptor.cpp
xnu-6153.41.3.tar.gz
[apple/xnu.git] / iokit / Kernel / IOSubMemoryDescriptor.cpp
index 8d0a472b12a6568c37322e9129f50296359f5a9c..c65c7c4863a0579e2c8f1efc9edde9bda414ef7a 100644 (file)
@@ -53,7 +53,7 @@ IOSubMemoryDescriptor::withSubRange(IOMemoryDescriptor *        of,
 
        if (self && !self->initSubRange(of, offset, length, (IODirection) options)) {
                self->release();
-               self = 0;
+               self = NULL;
        }
        return self;
 }
@@ -151,6 +151,22 @@ IOSubMemoryDescriptor::setPurgeable( IOOptionBits newState,
        return err;
 }
 
+IOReturn
+IOSubMemoryDescriptor::setOwnership( task_t newOwner,
+    int newLedgerTag,
+    IOOptionBits newLedgerOptions )
+{
+       IOReturn err;
+
+       if (iokit_iomd_setownership_enabled == FALSE) {
+               return kIOReturnUnsupported;
+       }
+
+       err = _parent->setOwnership( newOwner, newLedgerTag, newLedgerOptions );
+
+       return err;
+}
+
 IOReturn
 IOSubMemoryDescriptor::prepare(
        IODirection forDirection)
@@ -182,7 +198,7 @@ IOSubMemoryDescriptor::makeMapping(
        IOByteCount             offset,
        IOByteCount             length )
 {
-       IOMemoryMap * mapping = 0;
+       IOMemoryMap * mapping = NULL;
 
 #ifndef __LP64__
        if (!(kIOMap64Bit & options)) {