X-Git-Url: https://git.saurik.com/apple/xnu.git/blobdiff_plain/0a7de7458d150b5d4dffc935ba399be265ef0a1a..94ff46dc2849db4d43eaaf144872decc522aafb4:/iokit/Kernel/IOSubMemoryDescriptor.cpp diff --git a/iokit/Kernel/IOSubMemoryDescriptor.cpp b/iokit/Kernel/IOSubMemoryDescriptor.cpp index 8d0a472b1..c65c7c486 100644 --- a/iokit/Kernel/IOSubMemoryDescriptor.cpp +++ b/iokit/Kernel/IOSubMemoryDescriptor.cpp @@ -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)) {