Lines Matching refs:machPort

215 	IOMachPort *machPort;  in portForObjectInBucket()  local
217 SLIST_FOREACH(machPort, bucket, link) { in portForObjectInBucket()
218 if (machPort->object == obj && machPort->type == type) { in portForObjectInBucket()
219 return machPort; in portForObjectInBucket()
228 IOMachPort *machPort = NULL; in withObjectAndType() local
230 machPort = new IOMachPort; in withObjectAndType()
231 if (__improbable(machPort && !machPort->init())) { in withObjectAndType()
232 OSSafeReleaseNULL(machPort); in withObjectAndType()
236 machPort->object = obj; in withObjectAndType()
237 machPort->type = (typeof(machPort->type))type; in withObjectAndType()
238 machPort->port = iokit_alloc_object_port(obj, type); in withObjectAndType()
241 machPort->mscount++; in withObjectAndType()
243 return machPort; in withObjectAndType()
250 IOMachPort *machPort = NULL; in noMoreSendersForObject() local
261 machPort = IOMachPort::portForObjectInBucket(bucket, obj, type); in noMoreSendersForObject()
263 if (machPort) { in noMoreSendersForObject()
264 destroyed = (machPort->mscount <= *mscount); in noMoreSendersForObject()
266 *mscount = machPort->mscount; in noMoreSendersForObject()
272 SLIST_REMOVE(bucket, machPort, IOMachPort, link); in noMoreSendersForObject()
276 OS_ANALYZER_SUPPRESS("77508635") OSSafeReleaseNULL(machPort); in noMoreSendersForObject()
297 IOMachPort *machPort; in releasePortForObject() local
304 machPort = IOMachPort::portForObjectInBucket(bucket, obj, type); in releasePortForObject()
306 if (machPort && !machPort->holdDestroy) { in releasePortForObject()
308 SLIST_REMOVE(bucket, machPort, IOMachPort, link); in releasePortForObject()
312 OS_ANALYZER_SUPPRESS("77508635") OSSafeReleaseNULL(machPort); in releasePortForObject()
324 IOMachPort * machPort; in setHoldDestroy() local
329 machPort = IOMachPort::portForObjectInBucket(bucket, obj, type); in setHoldDestroy()
331 if (machPort) { in setHoldDestroy()
332 machPort->holdDestroy = true; in setHoldDestroy()
347 IOMachPort *machPort; in destroyUserReferences() local
365 machPort = IOMachPort::portForObjectInBucket(bucket, obj, IKOT_IOKIT_CONNECT); in destroyUserReferences()
367 if (machPort == NULL) { in destroyUserReferences()
372 SLIST_REMOVE(bucket, machPort, IOMachPort, link); in destroyUserReferences()
379 machPort->object = uc->mappings; in destroyUserReferences()
380 SLIST_INSERT_HEAD(mappingBucket, machPort, link); in destroyUserReferences()
381 iokit_switch_object_port(machPort->port, uc->mappings, IKOT_IOKIT_CONNECT); in destroyUserReferences()
388 OS_ANALYZER_SUPPRESS("77508635") OSSafeReleaseNULL(machPort); in destroyUserReferences()
392 OS_ANALYZER_SUPPRESS("77508635") OSSafeReleaseNULL(machPort); in destroyUserReferences()
648 IOMachPort *machPort = NULL; in iokit_port_for_object() local
655 machPort = IOMachPort::portForObjectInBucket(bucket, obj, type); in iokit_port_for_object()
657 if (__improbable(machPort == NULL)) { in iokit_port_for_object()
658 machPort = IOMachPort::withObjectAndType(obj, type); in iokit_port_for_object()
659 if (__improbable(machPort == NULL)) { in iokit_port_for_object()
662 SLIST_INSERT_HEAD(bucket, machPort, link); in iokit_port_for_object()
664 machPort->mscount++; in iokit_port_for_object()
667 iokit_retain_port(machPort->port); in iokit_port_for_object()
668 port = machPort->port; in iokit_port_for_object()