summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornrootconauto@gmail.com <nrootconauto@gmail.com>2022-11-03 12:00:54 -0400
committernrootconauto@gmail.com <nrootconauto@gmail.com>2022-11-03 12:01:40 -0400
commit228a882eecadd0df34fa11b5e7222a82269e75bd (patch)
tree2154d6a22df602bdb26a20fb4f0e15de8ad12b19
parent831a719ecc0c0353d9c9b3b18c1dcb5e33e8f5c3 (diff)
Added TaskRep. Seth is spawned before adam.higherres
Added more demos. Bungis is going to stay up all night and party. Someone get the beer. Signed-off-by: nrootconauto@gmail.com <nrootconauto@gmail.com>
-rw-r--r--HCRT.BINbin1111872 -> 1112544 bytes
-rw-r--r--T/BlkDev2/DskCFile.HC4
-rw-r--r--T/BlkDev2/DskStrA.HC3
-rw-r--r--T/Demo/Graphics/3DPoly.HC.Zbin0 -> 1056 bytes
-rw-r--r--T/Demo/Graphics/BSpline.HC.Zbin0 -> 519 bytes
-rw-r--r--T/Demo/Graphics/Bounce.HC.Zbin0 -> 617 bytes
-rw-r--r--T/Demo/Graphics/Box.HC.Zbin0 -> 701 bytes
-rw-r--r--T/Demo/Graphics/Cartesian.HC.Zbin0 -> 720 bytes
-rw-r--r--T/Demo/Graphics/CharAnimation.HC.Zbin0 -> 431 bytes
-rw-r--r--T/FULL_PACKAGE.HC5
-rw-r--r--T/HCRT.DBG.Zbin270561 -> 270599 bytes
-rw-r--r--T/HCRT_TOS.HC3
-rw-r--r--T/KERNELA.HH5
-rw-r--r--T/KTASK.HC5
-rw-r--r--T/TaskRep.HC42
15 files changed, 56 insertions, 11 deletions
diff --git a/HCRT.BIN b/HCRT.BIN
index 9c68410..2575163 100644
--- a/HCRT.BIN
+++ b/HCRT.BIN
Binary files differ
diff --git a/T/BlkDev2/DskCFile.HC b/T/BlkDev2/DskCFile.HC
index f460045..a2790f2 100644
--- a/T/BlkDev2/DskCFile.HC
+++ b/T/BlkDev2/DskCFile.HC
@@ -21,7 +21,7 @@ CFile *FOpen(U8 *filename,U8 *flags,I64 cnt=0,CTask *mem_task=NULL)
else
f->max_blk=I64_MAX;
f->file_clus_num=INVALID_CLUS;
- full_name=FileNameAbs(filename,mem_task);
+ full_name=FileNameAbs(filename);
f->dv=Let2Drv(*full_name);
if (f->dv->fs_type==FSt_REDSEA)
contiguous=TRUE;
@@ -110,7 +110,7 @@ U0 FClose(CFile *f)
DirContextDel(dirc);
}
goto en;
- }
+ }
if (f->flags & FF_BUF_DIRTY) {
ClusWrite(f->dv,f->clus_buf,f->clus,1);
f->flags&=~FF_BUF_DIRTY;
diff --git a/T/BlkDev2/DskStrA.HC b/T/BlkDev2/DskStrA.HC
index 57a7933..32c6465 100644
--- a/T/BlkDev2/DskStrA.HC
+++ b/T/BlkDev2/DskStrA.HC
@@ -154,7 +154,7 @@ U8 *DirNameAbs(U8 *_dirname)
else if (*buf4) {
if (StrCmp(buf3,"/"))
CatPrint(buf3,"/");
- CatPrint(buf3,buf4);
+ CatPrint(buf3,buf4);
}
}
Free(buf);
@@ -342,4 +342,3 @@ returns default.
if(!dft) dft=DirNameAbs(dirname);
return dft;
}
- \ No newline at end of file
diff --git a/T/Demo/Graphics/3DPoly.HC.Z b/T/Demo/Graphics/3DPoly.HC.Z
new file mode 100644
index 0000000..3af3777
--- /dev/null
+++ b/T/Demo/Graphics/3DPoly.HC.Z
Binary files differ
diff --git a/T/Demo/Graphics/BSpline.HC.Z b/T/Demo/Graphics/BSpline.HC.Z
new file mode 100644
index 0000000..0996fdb
--- /dev/null
+++ b/T/Demo/Graphics/BSpline.HC.Z
Binary files differ
diff --git a/T/Demo/Graphics/Bounce.HC.Z b/T/Demo/Graphics/Bounce.HC.Z
new file mode 100644
index 0000000..e239780
--- /dev/null
+++ b/T/Demo/Graphics/Bounce.HC.Z
Binary files differ
diff --git a/T/Demo/Graphics/Box.HC.Z b/T/Demo/Graphics/Box.HC.Z
new file mode 100644
index 0000000..2682c8d
--- /dev/null
+++ b/T/Demo/Graphics/Box.HC.Z
Binary files differ
diff --git a/T/Demo/Graphics/Cartesian.HC.Z b/T/Demo/Graphics/Cartesian.HC.Z
new file mode 100644
index 0000000..1e7623f
--- /dev/null
+++ b/T/Demo/Graphics/Cartesian.HC.Z
Binary files differ
diff --git a/T/Demo/Graphics/CharAnimation.HC.Z b/T/Demo/Graphics/CharAnimation.HC.Z
new file mode 100644
index 0000000..4f0243e
--- /dev/null
+++ b/T/Demo/Graphics/CharAnimation.HC.Z
Binary files differ
diff --git a/T/FULL_PACKAGE.HC b/T/FULL_PACKAGE.HC
index 56dabf4..495581c 100644
--- a/T/FULL_PACKAGE.HC
+++ b/T/FULL_PACKAGE.HC
@@ -59,7 +59,7 @@ U0 StartUpTasks()
ExeFile("/WallPaper.HC.Z");
ExePrint("WallPaperInit;;");
} catch
- PutExcept;
+ PutExcept;
ACInit("/KERNEL*.HH*");
AutoComplete(ON);
}
@@ -97,9 +97,10 @@ U0 Adam(U8 *) {
//We are "adam" task
SrvTaskCont;
}
-Gs->seth_task=Spawn(&CoreAPSethTask,NULL,"Seth");
//Our entering thread doesnt have a cur_thrd,so spawn one
adam_task=Spawn(&Adam,NULL,"Adam",,);
+Gs->seth_task=Spawn(&CoreAPSethTask,NULL,"Seth");
//Dont Exit
BirthWait(&adam_task);
DeathWait(&adam_task);
+ \ No newline at end of file
diff --git a/T/HCRT.DBG.Z b/T/HCRT.DBG.Z
index d776fa0..1f2d5f4 100644
--- a/T/HCRT.DBG.Z
+++ b/T/HCRT.DBG.Z
Binary files differ
diff --git a/T/HCRT_TOS.HC b/T/HCRT_TOS.HC
index 62be9be..ac4546d 100644
--- a/T/HCRT_TOS.HC
+++ b/T/HCRT_TOS.HC
@@ -126,10 +126,11 @@ U0 PutKey(I64 ch,I64 s) {
#include "Diff.HC"
#include "KeyDev.HC"
#include "FILEMGR.HC"
-#include "Training.HC.Z"
+#include "Training.HC.Z"
#include "InFile.HC"
#include"Community-Heiresis/HolyCipher/CIPHER.HC";
#include "Mount.HC"
+#include "TaskRep.HC"
/*I64 CheckSum(U8 *data,I64 len) {
I64 sum=0;
while(--len>=0) sum+=data[len];
diff --git a/T/KERNELA.HH b/T/KERNELA.HH
index 3cacac4..59ed06b 100644
--- a/T/KERNELA.HH
+++ b/T/KERNELA.HH
@@ -5242,7 +5242,7 @@ extern CIntermediateCode *OptLag(CIntermediateCode *tmpi);
extern CIntermediateCode *OptLag1(CIntermediateCode *tmpi);
extern CIntermediateCode *OptLag2(CIntermediateCode *tmpi);
extern CIntermediateCode *OptLead1(CIntermediateCode *tmpi);
-extern I64 CmpOffset2Reg(I64 offset,COptReg *reg_offsets);
+extern I64 CmpOffset2Reg(I64 offset,COptReg *reg_offsets);
extern Bool OptFixupBinaryOp1(CIntermediateCode *tmpi,
CIntermediateCode *tmpi1,CIntermediateCode *tmpi2,
Bool *is_unsigned);
@@ -6530,4 +6530,5 @@ extern U0 EnableScaling(Bool on=FALSE);
extern U0 SetVolume(F64);
extern F64 GetVolume();
extern CTextGlbls text;
-extern CTask *sys_task_being_scrn_updated; \ No newline at end of file
+extern CTask *sys_task_being_scrn_updated;
+public extern U0 TaskRep(); \ No newline at end of file
diff --git a/T/KTASK.HC b/T/KTASK.HC
index 0e5aa97..089ea3f 100644
--- a/T/KTASK.HC
+++ b/T/KTASK.HC
@@ -274,7 +274,7 @@ I64 TaskInit(CTask *task,I64 stk_size)
task->cur_dir=StrNew(Fs->cur_dir,task);
return task;
}
-CTask *Spawn(U0 (*fp_start_addr)(U8 *data),U8 *data=NULL,U8 *task_name=NULL,
+CTask *Spawn(U0 (*fp_start_addr)(U8 *data),U8 *data=NULL,U8 *task_name=NULL,
I64 target_cpu=-1, //-1 for current CPU. See \dLK,"multi-core",A="FI:::/Demo/MultiCore/LoadTest.HC"\d.
CTask *parent=NULL, //NULL means adam
I64 stk_size=0, //0=default
@@ -282,7 +282,8 @@ CTask *Spawn(U0 (*fp_start_addr)(U8 *data),U8 *data=NULL,U8 *task_name=NULL,
{//Create task on core running at address.
//Alloc \dLK,"CTask",A="MN:CTask"\d structure from code heap so addr will be short.
//Could be alloced off of data heap.
- if(!parent) parent=adam_task;
+ if(!parent) parent=Gs->seth_task;
+ if(!parent) parent=adam_task; //Modoifef by Nroot(adam_task spawns before seth)
if(target_cpu==-1)
target_cpu=Gs->num;
CTask *task=MAlloc32(sizeof(CTask),adam_task);
diff --git a/T/TaskRep.HC b/T/TaskRep.HC
new file mode 100644
index 0000000..2a82ce7
--- /dev/null
+++ b/T/TaskRep.HC
@@ -0,0 +1,42 @@
+#help_index "Info;Task"
+//Nroot's code
+
+I64 TaskMemCnt(CTask *task=NULL) {
+ if(!task) task=Fs;
+ if(!TaskValidate(task)) return 0;
+ I64 retval=0;
+ if(task->code_heap!=task->data_heap) {
+ retval=task->code_heap->alloced_u8s+
+ task->data_heap->alloced_u8s;
+ } else
+ retval=task->code_heap->alloced_u8s;
+ return retval;
+}
+U0 TaskRepTask(CTask *task,I64 indent)
+{
+ CTask *task1;
+ "%h*c$$MA,T=\"%08X\",LM=\"Kill(0x%X);\n\",$$ $$BLACK$$#%d$$FG$$ "
+ "$$TX,\"%$$Q...\",SCX=16$$\n",indent,CH_SPACE,task,task,task->task_num,
+ task->task_title;
+ "%h*c%08X%04X:%04X:%08X\n",indent+2,CH_SPACE,TaskMemCnt(task), //Changed by Nroot
+ task->task_flags,task->display_flags,task->win_inhibit;
+ task1=task->next_child_task;
+ while (task1!=(&task->next_child_task)(U8 *)
+ -offset(CTask.next_sibling_task)) {
+ TaskRepTask(task1,indent+2);
+ task1=task1->next_sibling_task;
+ }
+}
+
+public U0 TaskRep()
+{//Report current tasks on all cores.
+ I64 i,bl;
+ CCPU *c;
+ bl=BreakLock;
+ for (i=0;i<mp_cnt;i++) {
+ c=cpu_structs[i];
+ "$$PURPLE$$CPU%02X$$FG$$\n",i;
+ TaskRepTask(c->seth_task,2);
+ }
+ if(bl) BreakUnlock;
+}