IOSurfaceUnlock(_:_:_:)
“Unlock” an Iosurface for reading or writing.
Declaration
func IOSurfaceUnlock(_ buffer: IOSurfaceRef, _ options: IOSurfaceLockOptions, _ seed: UnsafeMutablePointer<UInt32>?) -> kern_return_tDiscussion
The term “lock” is used loosely in this context, and is used along with the “unlock” information to put a bound on CPU access to the raw IOSurface data.
If the seed parameter is non-NULL, IOSurfaceLock(_:_:_:) will store the buffer’s internal modification seed value at the time you made the lock call. You can compare this value to a value returned previously to determine of the contents of the buffer has been changed since the last lock.
In the case of IOSurfaceUnlock(_:_:_:), the seed value returned will be the internal seed value at the time of the unlock. If you locked the buffer for writing, this value will be incremented as the unlock is performed and the new value will be returned.
See the kIOSurfaceLock enums for more information.
See Also
Functions
IOSurfaceAlignProperty(_:_:)IOSurfaceAllowsPixelSizeCasting(_:)IOSurfaceCopyAllValues(_:)IOSurfaceCopyValue(_:_:)IOSurfaceCreate(_:)IOSurfaceCreateMachPort(_:)IOSurfaceCreateXPCObject(_:)IOSurfaceDecrementUseCount(_:)IOSurfaceGetAllocSize(_:)IOSurfaceGetBaseAddress(_:)IOSurfaceGetBaseAddressOfPlane(_:_:)IOSurfaceGetBitDepthOfComponentOfPlane(_:_:_:)IOSurfaceGetBitOffsetOfComponentOfPlane(_:_:_:)IOSurfaceGetBytesPerElement(_:)IOSurfaceGetBytesPerElementOfPlane(_:_:)