Lines Matching refs:victim

1027             ArbitrationLockQueueElement * victim = 0;
1053 victim = waiting;
1087 if( victim ) {
1089 // we do have a willing victim, fail it's lock
1090 victim->aborted = true;
1092 // take the victim off the waiting queue
1094 victim,
1098 // wake the victim
1100 victim,
1708 IOService * victim;
1741 victim = this;
1742 victim->retain();
1744 while( victim ) {
1746 didInactive = victim->lockForArbitration( true );
1748 didInactive = (0 == (victim->__state[0] & kIOServiceInactiveState));
1750 victim->__state[0] |= kIOServiceInactiveState;
1751 victim->__state[0] &= ~(kIOServiceRegisteredState | kIOServiceMatchedState
1754 if (victim == this)
1755 victim->__state[1] |= kIOServiceTermPhase1State;
1757 victim->_adjustBusy( 1 );
1759 } else if (victim != this) do {
1762 wait = (victim->__state[1] & kIOServiceTermPhase1State);
1764 TLOG("%s::waitPhase1(%s)\n", getName(), victim->getName());
1765 victim->__state[1] |= kIOServiceTerm1WaiterState;
1766 victim->unlockForArbitration();
1767 assert_wait((event_t)&victim->__state[1], THREAD_UNINT);
1772 TLOG("%s::did waitPhase1(%s)\n", getName(), victim->getName());
1773 victim->lockForArbitration();
1777 victim->unlockForArbitration();
1779 if( victim == this)
1783 victim->deliverNotification( gIOTerminatedNotification, 0, 0xffffffff );
1784 IOUserClient::destroyUserReferences( victim );
1786 iter = victim->getClientIterator();
1790 client->getName(), victim->getName(), (long long)options);
1791 ok = client->requestTerminate( victim, options );
1793 client->getName(), victim->getName(), ok);
1796 uint64_t regID2 = victim->getRegistryEntryID();
1811 victim->release();
1812 victim = (IOService *) makeInactive->getObject(0);
1813 if( victim) {
1814 victim->retain();
1890 // wait for the victim to go non-busy
2014 void IOService::actionWillTerminate( IOService * victim, IOOptionBits options,
2023 iter = victim->getClientIterator();
2027 client->getName(), victim->getName(), (long long)options);
2030 uint64_t regID2 = victim->getRegistryEntryID();
2038 ok = client->willTerminate( victim, options );
2045 void IOService::actionDidTerminate( IOService * victim, IOOptionBits options,
2053 victim->messageClients( kIOMessageServiceIsTerminated, (void *)(uintptr_t) options );
2055 iter = victim->getClientIterator();
2059 client->getName(), victim->getName(), (long long)options);
2060 client->didTerminate( victim, options, &defer );
2063 uint64_t regID2 = victim->getRegistryEntryID();
2073 client->getName(), victim->getName(), defer);
2079 void IOService::actionFinalize( IOService * victim, IOOptionBits options,
2083 TLOG("%s::finalize(%08llx)\n", victim->getName(), (long long)options);
2085 uint64_t regID1 = victim->getRegistryEntryID();
2092 victim->finalize( options );
2124 IOService * victim;
2143 while( (victim = (IOService *) gIOTerminatePhase2List->getObject(0) )) {
2145 victim->retain();
2149 while( victim ) {
2151 doPhase2 = victim->lockForArbitration( true );
2153 doPhase2 = (0 != (kIOServiceInactiveState & victim->__state[0]));
2155 doPhase2 = (0 == (victim->__state[1] & kIOServiceTermPhase2State))
2156 && (0 == (victim->__state[1] & kIOServiceConfigState));
2158 if (doPhase2 && (iter = victim->getClientIterator())) {
2165 victim->__state[1] |= kIOServiceTermPhase2State;
2167 victim->unlockForArbitration();
2170 if( 0 == victim->getClient()) {
2173 gIOFinalizeList->tailQ( victim );
2177 victim, (void *)(uintptr_t) options, (void *)(uintptr_t) doPhase2List );
2179 didPhase2List->headQ( victim );
2181 victim->release();
2182 victim = (IOService *) doPhase2List->getObject(0);
2183 if( victim) {
2184 victim->retain();
2189 while( (victim = (IOService *) didPhase2List->getObject(0)) ) {
2191 if( victim->lockForArbitration( true )) {
2192 victim->__state[1] |= kIOServiceTermPhase3State;
2193 victim->unlockForArbitration();
2196 victim, (void *)(uintptr_t) options );
2206 while( (victim = (IOService *) gIOFinalizeList->getObject(0))) {
2210 victim, (void *)(uintptr_t) options );
2213 freeList->setObject( victim );