Handle timeouts. Return the next timeout or -1 if no timeout is pending.
| 627 | #if UNUSED |
| 628 | // Handle timeouts. Return the next timeout or -1 if no timeout is pending. |
| 629 | int CSL3StateMachine::csl3HandleTimers() |
| 630 | { |
| 631 | ScopedLock lock(gNewTransactionTable.mLock,__FILE__,__LINE__); |
| 632 | int nextTimeout = -1; |
| 633 | for (NewTransactionMap::iterator itr = gNewTransactionTable.mTable.begin(); itr!=gNewTransactionTable.mTable.end(); ++itr) { |
| 634 | TranEntry *tran = itr->second; |
| 635 | if (tran->deadOrRemoved()) continue; |
| 636 | tran->checkTimers(); |
| 637 | } |
| 638 | for (NewTransactionMap::iterator itr = gNewTransactionTable.mTable.begin(); itr!=gNewTransactionTable.mTable.end(); ++itr) { |
| 639 | TranEntry *tran = itr->second; |
| 640 | int remaining = tran->remainingTime(); |
| 641 | if (remaining >= 0) { |
| 642 | nextTimeout = (nextTimeout == -1) ? remaining : min(nextTimeout,remaining); |
| 643 | } |
| 644 | LOG(DEBUG)<<"transaction "<<tran->tranID()<<LOGVAR(nextTimeout); |
| 645 | } |
| 646 | return nextTimeout; |
| 647 | } |
| 648 | #endif |
| 649 | |
| 650 | #if UNUSED |
nothing calls this directly
no test coverage detected