- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
tartcalc:;
EnterCriticalSection(&RuskMTSec); // enter to critical section
RunNew=-1; // no screen part for calculate by default
for (ScrAr=0; ScrAr<SCRARMT; ScrAr++){ // loop all screen parts
if (ScrAreaReq[ScrAr]==0){ScrAreaReq[ScrAr]=1;RunNew=ScrAr;break;} // find next free area for calculating it
}
LeaveCriticalSection(&RuskMTSec); // leave critical section
if (RunNew>=0){goto calcmore;} // screen area for calculating is found
// < search for uncalculated screen area
// << main calculation
//
//
// > put rdy signal and go to wait time
SetEvent(hEventsArrayRdy[THRD_num]); // set flag, that request is done
}
goto more; // go to wait for next request
// < put rdy signal and go to wait time
return 0;
Комментарии (0) RSS
Добавить комментарий