Lines Matching refs:victim

1026             ArbitrationLockQueueElement * victim = 0;
1052 victim = waiting;
1086 if( victim ) {
1088 // we do have a willing victim, fail it's lock
1089 victim->aborted = true;
1091 // take the victim off the waiting queue
1093 victim,
1097 // wake the victim
1099 victim,
1707 IOService * victim;
1738 victim = this;
1739 victim->retain();
1741 while( victim ) {
1743 didInactive = victim->lockForArbitration( true );
1745 didInactive = (0 == (victim->__state[0] & kIOServiceInactiveState));
1747 victim->__state[0] |= kIOServiceInactiveState;
1748 victim->__state[0] &= ~(kIOServiceRegisteredState | kIOServiceMatchedState
1751 if (victim == this)
1752 victim->__state[1] |= kIOServiceTermPhase1State;
1754 victim->_adjustBusy( 1 );
1756 } else if (victim != this) do {
1759 wait = (victim->__state[1] & kIOServiceTermPhase1State);
1761 TLOG("%s::waitPhase1(%s)\n", getName(), victim->getName());
1762 victim->__state[1] |= kIOServiceTerm1WaiterState;
1763 victim->unlockForArbitration();
1764 assert_wait((event_t)&victim->__state[1], THREAD_UNINT);
1769 TLOG("%s::did waitPhase1(%s)\n", getName(), victim->getName());
1770 victim->lockForArbitration();
1774 victim->unlockForArbitration();
1776 if( victim == this)
1780 victim->deliverNotification( gIOTerminatedNotification, 0, 0xffffffff );
1781 IOUserClient::destroyUserReferences( victim );
1783 iter = victim->getClientIterator();
1787 client->getName(), victim->getName(), (long long)options);
1788 ok = client->requestTerminate( victim, options );
1790 client->getName(), victim->getName(), ok);
1793 uint64_t regID2 = victim->getRegistryEntryID();
1808 victim->release();
1809 victim = (IOService *) makeInactive->getObject(0);
1810 if( victim) {
1811 victim->retain();
1869 // wait for the victim to go non-busy
1993 void IOService::actionWillTerminate( IOService * victim, IOOptionBits options,
2002 iter = victim->getClientIterator();
2006 client->getName(), victim->getName(), (long long)options);
2009 uint64_t regID2 = victim->getRegistryEntryID();
2017 ok = client->willTerminate( victim, options );
2024 void IOService::actionDidTerminate( IOService * victim, IOOptionBits options,
2032 victim->messageClients( kIOMessageServiceIsTerminated, (void *) options );
2034 iter = victim->getClientIterator();
2038 client->getName(), victim->getName(), (long long)options);
2039 client->didTerminate( victim, options, &defer );
2042 uint64_t regID2 = victim->getRegistryEntryID();
2052 client->getName(), victim->getName(), defer);
2058 void IOService::actionFinalize( IOService * victim, IOOptionBits options,
2062 TLOG("%s::finalize(%08llx)\n", victim->getName(), (long long)options);
2064 uint64_t regID1 = victim->getRegistryEntryID();
2071 victim->finalize( options );
2102 IOService * victim;
2121 while( (victim = (IOService *) gIOTerminatePhase2List->getObject(0) )) {
2123 victim->retain();
2127 while( victim ) {
2129 doPhase2 = victim->lockForArbitration( true );
2131 doPhase2 = (0 != (kIOServiceInactiveState & victim->__state[0]));
2133 doPhase2 = (0 == (victim->__state[1] & kIOServiceTermPhase2State))
2134 && (0 == (victim->__state[1] & kIOServiceConfigState));
2136 victim->__state[1] |= kIOServiceTermPhase2State;
2138 victim->unlockForArbitration();
2141 if( 0 == victim->getClient()) {
2144 gIOFinalizeList->tailQ( victim );
2148 victim, (void *) options, (void *) doPhase2List );
2150 didPhase2List->headQ( victim );
2152 victim->release();
2153 victim = (IOService *) doPhase2List->getObject(0);
2154 if( victim) {
2155 victim->retain();
2160 while( (victim = (IOService *) didPhase2List->getObject(0)) ) {
2162 if( victim->lockForArbitration( true )) {
2163 victim->__state[1] |= kIOServiceTermPhase3State;
2164 victim->unlockForArbitration();
2167 victim, (void *) options );
2177 while( (victim = (IOService *) gIOFinalizeList->getObject(0))) {
2181 victim, (void *) options );
2184 freeList->setObject( victim );