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

+2 -2
View File
@@ -1,12 +1,12 @@
interrupt U0 IntBeepOn()
{
*LAPIC_EOI(U32 *)=0; //signal end of interrupt
*(dev.uncached_alias+LAPIC_EOI)(U32 *)=0; //signal end of interrupt
Snd(100);
}
interrupt U0 IntBeepOff()
{
*LAPIC_EOI(U32 *)=0;
*(dev.uncached_alias+LAPIC_EOI)(U32 *)=0;
Snd(0);
}
+1 -1
View File
@@ -2,7 +2,7 @@ U0 Job(CDoc *doc)
{
I64 i;
for (i=0;i<2;i++)
DocPrint(doc,"$$FG,%d$$CPU%d ",Gs->num,Gs->num);
DocPrint(doc,"$$FG,%d$$CPU%d ",Gs->num&15,Gs->num);
}
U0 MPPrintDemo()
+1 -1
View File
@@ -132,7 +132,7 @@ U0 MPRadixSortDemo(I64 dummy=0)
MPRadixSortDemo;
/*$HL,0$ Ress on 8 Cores 3.397GHz Core i7:
/*$HL,0$ Results on 8 Cores 3.397GHz Core i7:
$FG,2$QSort$FG$
Time: 0.759998
$FG,2$QSortU32$FG$
+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;