TempleOSCDV4.10.ISO

This commit is contained in:
Terry A. Davis authored and minexew committed 2018-09-08 21:47:44 +02:00
1 parent c5954d3371
commit 9206246147
181 files changed
+4468 -4313

No files matched your search

+46
View File
@@ -0,0 +1,46 @@
Bool mp_start,mp_end;
I64 mp_not_done_flags,
**glbl_cnts;
U0 MPRateCores(I64 )
{
I64 i=0;
while (!mp_start)
Yield;
while (!mp_end) {
i++;
Yield;
}
glbl_cnts[Gs->num]=i;
LBtr(&mp_not_done_flags,Gs->num);
}
U0 RateCores()
{
I64 i;
F64 t0,tf;
glbl_cnts=CAlloc(sizeof(I64)*mp_cnt);
mp_start=mp_end=FALSE;
mp_not_done_flags=1<<mp_cnt-1;
for (i=0;i<mp_cnt;i++)
Spawn(&MPRateCores,,NULL,i);
t0=tS;
mp_start=TRUE;
Sleep(2000);
mp_end=TRUE;
while (mp_not_done_flags)
Yield;
tf=tS;
"\n Context\n"
"Core Swaps/s\n"
"---- --------------\n";
for (i=0;i<mp_cnt;i++)
"%4d %14.2,f\n",i,glbl_cnts[i]/(tf-t0);
"---- --------------\n\n";
Free(glbl_cnts);
}
RateCores;