| 484 | } |
| 485 | |
| 486 | void CRefStreamEngine::OnIOJobExecuted (CRefReadStreamProxy* pJobProxy) |
| 487 | { |
| 488 | if (m_hIOWorker && (pJobProxy->GetParams().nFlags & SRP_FLAGS_ASYNC_CALLBACK)) |
| 489 | pJobProxy->FinalizeIO(); |
| 490 | |
| 491 | { |
| 492 | AUTO_LOCK(m_csIOPending); |
| 493 | { |
| 494 | AUTO_LOCK(m_csIOExecuted); |
| 495 | // first add, then erase - to avoid releasing the autopointer |
| 496 | // this is under double-locked CS's to avoid in-between artifacts |
| 497 | m_queIOExecuted.push_back(pJobProxy); |
| 498 | m_setIOPending.erase (pJobProxy); |
| 499 | } |
| 500 | } |
| 501 | |
| 502 | SetEvent (m_hIOExecuted); |
| 503 | |
| 504 | // perhaps this will free the way for another IO job. |
| 505 | // but we won't call StartIOJobs(), because this same funciton can only be |
| 506 | // called as part of Waiting after which the caller is aware that some jobs may have been executed |
| 507 | } |
| 508 | |
| 509 | #ifndef LINUX |
| 510 | // returns the (cached) size of the sector on the volume where the given path points |
no test coverage detected