Lines Matching refs:inst
1267 OSAction * inst = NULL; in OSActionCreateWithTypeNameInternal() local
1284 inst = OSDynamicCast(OSAction, obj); in OSActionCreateWithTypeNameInternal()
1286 assert(inst); // obj is a subclass of OSAction so the dynamic cast should always work in OSActionCreateWithTypeNameInternal()
1293 inst = OSTypeAlloc(OSAction); in OSActionCreateWithTypeNameInternal()
1294 if (!inst) { in OSActionCreateWithTypeNameInternal()
1308 inst->ivars = IONewZero(OSAction_IVars, 1); in OSActionCreateWithTypeNameInternal()
1309 if (!inst->ivars) { in OSActionCreateWithTypeNameInternal()
1318 inst->ivars->userServer = OSDynamicCast(IOUserServer, us); in OSActionCreateWithTypeNameInternal()
1319 assert(inst->ivars->userServer); in OSActionCreateWithTypeNameInternal()
1320 inst->ivars->userServer->retain(); in OSActionCreateWithTypeNameInternal()
1323 inst->ivars->target = target; in OSActionCreateWithTypeNameInternal()
1324 inst->ivars->targetmsgid = targetmsgid; in OSActionCreateWithTypeNameInternal()
1325 inst->ivars->msgid = msgid; in OSActionCreateWithTypeNameInternal()
1327 inst->ivars->reference = reference; in OSActionCreateWithTypeNameInternal()
1328 inst->ivars->referenceSize = referenceSize; in OSActionCreateWithTypeNameInternal()
1334 inst->ivars->typeName = typeName; in OSActionCreateWithTypeNameInternal()
1336 *action = inst; in OSActionCreateWithTypeNameInternal()
1337 inst = NULL; // prevent release in OSActionCreateWithTypeNameInternal()
1343 OSSafeReleaseNULL(inst); in OSActionCreateWithTypeNameInternal()
1515 IOInterruptDispatchSource * inst; in Create_Impl() local
1522 inst = OSTypeAlloc(IOInterruptDispatchSource); in Create_Impl()
1523 if (!inst->init()) { in Create_Impl()
1524 inst->free(); in Create_Impl()
1528 inst->ivars->lock = IOSimpleLockAlloc(); in Create_Impl()
1530 ret = provider->getInterruptType(index, &inst->ivars->interruptType); in Create_Impl()
1532 OSSafeReleaseNULL(inst); in Create_Impl()
1535 ret = provider->registerInterrupt(index, inst, IOInterruptDispatchSourceInterrupt, inst->ivars); in Create_Impl()
1537 inst->ivars->intIndex = index; in Create_Impl()
1538 inst->ivars->flags = flags; in Create_Impl()
1539 inst->ivars->provider = provider; in Create_Impl()
1540 inst->ivars->provider->retain(); in Create_Impl()
1541 *source = inst; in Create_Impl()
1784 IOServiceNotificationDispatchSource * inst; in Create_Impl() local
1786 inst = OSTypeAlloc(IOServiceNotificationDispatchSource); in Create_Impl()
1787 if (!inst->init()) { in Create_Impl()
1788 OSSafeReleaseNULL(inst); in Create_Impl()
1795 OSSafeReleaseNULL(inst); in Create_Impl()
1798 inst->ivars->serverName = us->copyProperty(gIOUserServerNameKey); in Create_Impl()
1799 if (!inst->ivars->serverName) { in Create_Impl()
1800 OSSafeReleaseNULL(inst); in Create_Impl()
1804 inst->ivars->lock = IOLockAlloc(); in Create_Impl()
1805 if (!inst->ivars->lock) { in Create_Impl()
1806 OSSafeReleaseNULL(inst); in Create_Impl()
1810 inst->ivars->pending[idx] = OSArray::withCapacity(4); in Create_Impl()
1811 if (!inst->ivars->pending[idx]) { in Create_Impl()
1812 OSSafeReleaseNULL(inst); in Create_Impl()
1816 inst->ivars->interestNotifiers = OSDictionary::withCapacity(4); in Create_Impl()
1817 if (!inst->ivars->interestNotifiers) { in Create_Impl()
1818 OSSafeReleaseNULL(inst); in Create_Impl()
1822 …inst->ivars->notifier = IOService::addMatchingNotification(gIOMatchedNotification, matching, 0 /*p… in Create_Impl()
1830 okToUse = (serverName && inst->ivars->serverName->isEqualTo(serverName)); in Create_Impl()
1863 IOLockLock(inst->ivars->lock); in Create_Impl()
1864 notifyReady = (0 == inst->ivars->pending[kIOServiceNotificationTypeMatched]->getCount()); in Create_Impl()
1865 inst->ivars->pending[kIOServiceNotificationTypeMatched]->setObject(newService); in Create_Impl()
1866 IOLockUnlock(inst->ivars->lock); in Create_Impl()
1876 IOLockLock(inst->ivars->lock); in Create_Impl()
1877 notifyReady = (0 == inst->ivars->pending[kIOServiceNotificationTypeTerminated]->getCount()); in Create_Impl()
1878 inst->ivars->pending[kIOServiceNotificationTypeTerminated]->setObject(provider); in Create_Impl()
1879 if (inst->ivars->interestNotifiers != NULL) { in Create_Impl()
1880 …interest = (typeof(interest))inst->ivars->interestNotifiers->getObject((const OSSymbol *) newServi… in Create_Impl()
1883 inst->ivars->interestNotifiers->removeObject((const OSSymbol *) newService); in Create_Impl()
1885 IOLockUnlock(inst->ivars->lock); in Create_Impl()
1890 if (notifyReady && inst->ivars->action) { in Create_Impl()
1891 inst->ServiceNotificationReady(inst->ivars->action); in Create_Impl()
1896 IOLockLock(inst->ivars->lock); in Create_Impl()
1897 inst->ivars->interestNotifiers->setObject((const OSSymbol *) newService, interest); in Create_Impl()
1898 IOLockUnlock(inst->ivars->lock); in Create_Impl()
1901 if (inst->ivars->action) { in Create_Impl()
1902 inst->ServiceNotificationReady(inst->ivars->action); in Create_Impl()
1908 if (!inst->ivars->notifier) { in Create_Impl()
1909 OSSafeReleaseNULL(inst); in Create_Impl()
1913 *notification = inst; in Create_Impl()
4102 IOUserServer * inst; in OSDefineMetaClassAndStructors() local
4110 inst = new IOUserServer; in OSDefineMetaClassAndStructors()
4111 if (inst && !inst->init()) { in OSDefineMetaClassAndStructors()
4112 inst->release(); in OSDefineMetaClassAndStructors()
4113 inst = NULL; in OSDefineMetaClassAndStructors()
4114 return inst; in OSDefineMetaClassAndStructors()
4116 OS_ANALYZER_SUPPRESS("82033761") inst->PMinit(); in OSDefineMetaClassAndStructors()
4118 inst->fOwningTask = current_task(); in OSDefineMetaClassAndStructors()
4119 task_reference(inst->fOwningTask); in OSDefineMetaClassAndStructors()
4121 inst->fEntitlements = IOUserClient::copyClientEntitlements(inst->fOwningTask); in OSDefineMetaClassAndStructors()
4127 p = (proc_t)get_bsdtask_info(inst->fOwningTask); in OSDefineMetaClassAndStructors()
4136 if (inst->fEntitlements == NULL) { in OSDefineMetaClassAndStructors()
4147 inst->fTeamIdentifier = OSString::withCString(dextTeamID); in OSDefineMetaClassAndStructors()
4153 inst->release(); in OSDefineMetaClassAndStructors()
4154 inst = NULL; in OSDefineMetaClassAndStructors()
4155 return inst; in OSDefineMetaClassAndStructors()
4160 iokit_label_dext_task(inst->fOwningTask); in OSDefineMetaClassAndStructors()
4162 inst->fLock = IOLockAlloc(); in OSDefineMetaClassAndStructors()
4163 inst->fServices = OSArray::withCapacity(4); in OSDefineMetaClassAndStructors()
4164 inst->fClasses = OSDictionary::withCapacity(16); in OSDefineMetaClassAndStructors()
4165 inst->fClasses->setOptions(OSCollection::kSort, OSCollection::kSort); in OSDefineMetaClassAndStructors()
4166 inst->fPlatformDriver = task_get_platform_binary(inst->fOwningTask); in OSDefineMetaClassAndStructors()
4167 if (csproc_get_validation_category(current_proc(), &inst->fCSValidationCategory) != KERN_SUCCESS) { in OSDefineMetaClassAndStructors()
4168 inst->fCSValidationCategory = CS_VALIDATION_CATEGORY_INVALID; in OSDefineMetaClassAndStructors()
4170 inst->fWorkLoop = IOWorkLoop::workLoop(); in OSDefineMetaClassAndStructors()
4172 inst->setProperty(kIOUserClientDefaultLockingKey, kOSBooleanTrue); in OSDefineMetaClassAndStructors()
4173 inst->setProperty(kIOUserClientDefaultLockingSetPropertiesKey, kOSBooleanTrue); in OSDefineMetaClassAndStructors()
4174 inst->setProperty(kIOUserClientDefaultLockingSingleThreadExternalMethodKey, kOSBooleanTrue); in OSDefineMetaClassAndStructors()
4176 inst->setProperty(kIOUserClientEntitlementsKey, kOSBooleanFalse); in OSDefineMetaClassAndStructors()
4178 return inst; in OSDefineMetaClassAndStructors()
5191 OSObject * inst; in Create_Impl() local
5207 inst = NULL; in Create_Impl()
5237 inst = OSMetaClass::allocClassWithName(sym); in Create_Impl()
5238 service = OSDynamicCast(IOService, inst); in Create_Impl()
5254 OSSafeReleaseNULL(inst); in Create_Impl()
7341 IOWorkGroup * inst = NULL; in Create_Impl() local
7362 inst = OSTypeAlloc(IOWorkGroup); in Create_Impl()
7363 if (!inst->init()) { in Create_Impl()
7364 inst->free(); in Create_Impl()
7365 inst = NULL; in Create_Impl()
7371 inst->ivars->userServer = OSDynamicCast(IOUserServer, us); in Create_Impl()
7373 if (inst->ivars->userServer == NULL) { in Create_Impl()
7377 inst->ivars->userServer->retain(); in Create_Impl()
7379 inst->ivars->name = name; in Create_Impl()
7380 inst->ivars->name->retain(); in Create_Impl()
7382 inst->ivars->userClient = uc; // no retain in Create_Impl()
7385 uc->fWorkGroups->setObject(name, inst); in Create_Impl()
7391 OSSafeReleaseNULL(inst); in Create_Impl()
7393 *workgroup = inst; in Create_Impl()
7453 IOEventLink * inst = NULL; in Create_Impl() local
7474 inst = OSTypeAlloc(IOEventLink); in Create_Impl()
7475 if (!inst->init()) { in Create_Impl()
7476 inst->free(); in Create_Impl()
7477 inst = NULL; in Create_Impl()
7483 inst->ivars->userServer = OSDynamicCast(IOUserServer, us); in Create_Impl()
7485 if (inst->ivars->userServer == NULL) { in Create_Impl()
7489 inst->ivars->userServer->retain(); in Create_Impl()
7491 inst->ivars->name = name; in Create_Impl()
7492 inst->ivars->name->retain(); in Create_Impl()
7494 inst->ivars->userClient = uc; // no retain in Create_Impl()
7497 uc->fEventLinks->setObject(name, inst); in Create_Impl()
7504 OSSafeReleaseNULL(inst); in Create_Impl()
7506 *eventlink = inst; in Create_Impl()