// aktualni proces zaradi do fronty S a zpasivuje ho void CProcess::Wait(CHead * S) { if (this != Current()) return; Current()->Into(S); // pokud S neni NULL, je na konec // seznamu S zarazen proces Current() Passivate(); // potlaceni aktivniho procesu }
ULONG CBaseFT::Release() { ULONG ulRefs = (ULONG)InterlockedDecrement((LONG*)&_ulRefs); if(ulRefs == 0) { Passivate(); AssertSz(_ulRefs==0, "CBaseFT::AddRef occured after last release"); SubRelease(); } return ulRefs; }
// potlaceni procesu p void CProcess::Cancel(CProcess * p) { if (p == Current()) Passivate(); // potlaceni prave aktivniho procesu else // provadi uz Passivate { if (p->event != NULL) // pokud ma p zaznam v SQS { p->event->Out(); // zrus ho delete (p->event); p->event=NULL; } } }