mirror of
https://github.com/Zeal-Operating-System/ZealOS.git
synced 2024-12-25 23:10:32 +00:00
Add verbose TaskRep functionality.
Add ST_WIN_INHIBIT_FLAGS, ST_TASK_FLAGS, ST_DISPLAY_FLAGS, WIf_FLAGS_NUM, TASKf_FLAGS_NUM, DISPLAYf_FLAGS_NUM. Add verbose Bool default arg to TaskRep and verbose Task report logic in TaskRepTask.
This commit is contained in:
parent
0ef5e97000
commit
a25b7fd03f
6 changed files with 96 additions and 12 deletions
|
@ -1,4 +1,8 @@
|
|||
$WW,1$$FG,5$$TX+CX,"ChangeLog"$$FG$
|
||||
$IV,1$----04/01/22 00:20:08----$IV,0$
|
||||
* Added $LK+PU,"ST_WIN_INHIBIT_FLAGS",A="MN:ST_WIN_INHIBIT_FLAGS"$, $LK+PU,"ST_TASK_FLAGS",A="MN:ST_TASK_FLAGS"$, $LK+PU,"ST_DISPLAY_FLAGS",A="MN:ST_DISPLAY_FLAGS"$, $LK+PU,"WIf_FLAGS_NUM",A="MN:WIf_FLAGS_NUM"$, $LK+PU,"TASKf_FLAGS_NUM",A="MN:TASKf_FLAGS_NUM"$, $LK+PU,"DISPLAYf_FLAGS_NUM",A="MN:DISPLAYf_FLAGS_NUM"$.
|
||||
* Added verbose Bool argument to $LK+PU,"TaskRep",A="MN:TaskRep"$, add logic to $LK+PU,"TaskRepTask",A="MN:TaskRepTask"$ to print out detailed task information. Default parameter value is FALSE.
|
||||
|
||||
$IV,1$----03/25/22 12:55:27----$IV,0$
|
||||
* Raised version number to 1.12.
|
||||
* Removed DocOpt, DocOptList, DocOptFile, DocOptDoc, and DocOptEntry.
|
||||
|
|
|
@ -6,9 +6,9 @@ $FG,5$$WW,1$$TX+CX,"ZealOS Charter"$$FG$
|
|||
|
||||
* Low line count and code complexity is the highest good, so it is easy to learn the whole thing. Users should see the light at the end of the tunnel. One file system, for example, is better than many file systems.
|
||||
|
||||
* There is a limit of 100,000 lines of code for all time, not including applications and demos. Currently, there are $TX,"95,190",D="DD_ZEALOS_LOC"$ lines of code. $FG,4$3rd party libraries are banned$FG$ because they circumvent the intent of this limit. The vision is a Commodore 64 ROM -- a fixed core API that is the only dependency of applications. Dependency on components and libraries creates a hell that is no longer blissful.
|
||||
* There is a limit of 100,000 lines of code for all time, not including applications and demos. Currently, there are $TX,"97,194",D="DD_ZEALOS_LOC"$ lines of code. $FG,4$3rd party libraries are banned$FG$ because they circumvent the intent of this limit. The vision is a Commodore 64 ROM -- a fixed core API that is the only dependency of applications. Dependency on components and libraries creates a hell that is no longer blissful.
|
||||
|
||||
* The metric for resolving all ZealOS code governance issues is how fast the compiler compiles itself and the kernel with $LK,"BootHDIns",A="MN:BootHDIns"$(). The $LK,"ZealC",A="FI:::/Doc/ZealC.DD"$ language should be changed to optimize this metric, as Terry Davis did when he changed type casting from prefix standard C to postfix $LK,"ZealC",A="FI:::/Doc/ZealC.DD"$, but we need a rule to prevent degenerating into a brainfuck language.
|
||||
* The primary metric for resolving all ZealOS code governance issues is how fast the compiler compiles itself and the kernel with $LK,"BootHDIns",A="MN:BootHDIns"$(). The secondary metric is how understandable the code is. The $LK,"ZealC",A="FI:::/Doc/ZealC.DD"$ language should be changed to optimize these metrics, as Terry Davis did when he changed type casting from prefix standard C to postfix $LK,"ZealC",A="FI:::/Doc/ZealC.DD"$, but we need a rule to prevent degenerating into a brainfuck language.
|
||||
|
||||
* Minimal abstraction is a goal. Sheep are fools. They always respect a design that is more complicated than another. Any genius can make it complicated. Like in physics, it takes a supra-genius to make it simple.
|
||||
|
||||
|
|
|
@ -227,6 +227,59 @@ U0 SysDefinesLoad()
|
|||
"SWAP\0"
|
||||
"UNKNOWN\0");
|
||||
|
||||
DefineListLoad("ST_TASK_FLAGS",
|
||||
"Task Lock\0"
|
||||
"Kill Task\0"
|
||||
"Suspended\0"
|
||||
"Idle\0"
|
||||
"Cmd Line Prompt\0"
|
||||
"Input Filter Task\0"
|
||||
"Filter Input\0"
|
||||
"Has Song\0"
|
||||
"Disable Breakpoints\0"
|
||||
"Awaiting Message\0"
|
||||
"Break Locked\0"
|
||||
"Pending Break\0"
|
||||
"Break to Shift Esc\0"
|
||||
"Kill After Debug\0"
|
||||
"Non-Timer Rand\0");
|
||||
|
||||
DefineListLoad("ST_DISPLAY_FLAGS",
|
||||
"Show\0"
|
||||
"Not Raw\0"
|
||||
"Silent\0"
|
||||
"No Border\0"
|
||||
"Window on Top\0"
|
||||
"Children Not on Top\0");
|
||||
|
||||
DefineListLoad("ST_WIN_INHIBIT_FLAGS",
|
||||
"Self Focus\0"
|
||||
"Self Menu\0"
|
||||
"Self Ctrls\0"
|
||||
"Self Mouse Left\0"
|
||||
"Self Mouse Left Pressed\0"
|
||||
"Self Mouse Right\0"
|
||||
"Self Mouse Right Pressed\0"
|
||||
"Self Mouse Wheel\0"
|
||||
"Self Border\0"
|
||||
"Self Grab-Scroll\0"
|
||||
"Self Doc\0"
|
||||
"Self ODE\0"
|
||||
"Self Key Description\0"
|
||||
" \0"
|
||||
" \0"
|
||||
" \0"
|
||||
" \0"
|
||||
"Focus Task Menu\0"
|
||||
"Focus Task Ctrls\0"
|
||||
"Focus Task Mouse Left\0"
|
||||
"Focus Task Mouse Left Pressed\0"
|
||||
"Focus Task Mouse Right\0"
|
||||
"Focus Task Mouse Right Pressed\0"
|
||||
"Focus Task Mouse Wheel\0"
|
||||
"Focus Task Border\0"
|
||||
"Focus Task Grab-Scroll\0");
|
||||
|
||||
DefineListLoad("ST_COLORS",
|
||||
"BLACK\0"
|
||||
"BLUE\0"
|
||||
|
|
|
@ -1594,6 +1594,7 @@ tries to do something.
|
|||
#define WIf_FOCUS_TASK_MS_WHEEL 23
|
||||
#define WIf_FOCUS_TASK_BORDER 24
|
||||
#define WIf_FOCUS_TASK_GRAB_SCROLL 25
|
||||
#define WIf_FLAGS_NUM 26
|
||||
|
||||
class CWinMgrTimingGlobals
|
||||
{
|
||||
|
@ -3932,6 +3933,7 @@ public class CTaskSettings
|
|||
#define TTS_CUR_LEX 4
|
||||
|
||||
//CTask.task_flags
|
||||
//See $LK,"ST_TASK_FLAGS",A="MN:ST_TASK_FLAGS"$
|
||||
#define TASKf_TASK_LOCK 0
|
||||
#define TASKf_KILL_TASK 1
|
||||
#define TASKf_SUSPENDED 2
|
||||
|
@ -3946,8 +3948,8 @@ public class CTaskSettings
|
|||
#define TASKf_PENDING_BREAK 11
|
||||
#define TASKf_BREAK_TO_SHIFT_ESC 12
|
||||
#define TASKf_KILL_AFTER_DEBUG 13
|
||||
|
||||
#define TASKf_NONTIMER_RAND 14
|
||||
#define TASKf_FLAGS_NUM 15
|
||||
|
||||
//CTask.display_flags
|
||||
#define DISPLAYf_SHOW 0
|
||||
|
@ -3956,6 +3958,7 @@ public class CTaskSettings
|
|||
#define DISPLAYf_NO_BORDER 3
|
||||
#define DISPLAYf_WIN_ON_TOP 4
|
||||
#define DISPLAYf_CHILDREN_NOT_ON_TOP 5
|
||||
#define DISPLAYf_FLAGS_NUM 6
|
||||
|
||||
#define TASK_SIGNATURE_VAL 'TskS'
|
||||
#define TASK_NAME_LEN 32
|
||||
|
|
|
@ -1,7 +1,10 @@
|
|||
|
||||
|
||||
#help_index "Info;Task"
|
||||
U0 TaskRepTask(CTask *task, I64 indent)
|
||||
U0 TaskRepTask(CTask *task, I64 indent, Bool verbose)
|
||||
{
|
||||
CTask *task1;
|
||||
CTask *task1;
|
||||
I64 i;
|
||||
|
||||
if (!IsRaw)
|
||||
"%h*c$$MA,T=\"%08X\",LM=\"Kill(0x%X);\n\",$$ $$BLACK$$#%d$$FG$$ $$TX,\"%$$Q...\",SCX=16$$\n",
|
||||
|
@ -10,17 +13,38 @@ U0 TaskRepTask(CTask *task, I64 indent)
|
|||
"%h*c%08X #%d %$$Q\n",
|
||||
indent, CH_SPACE, task, task->task_num, task->task_title;
|
||||
|
||||
"%h*c%08X %04X:%04X:%08X\n", indent + 2, CH_SPACE,
|
||||
TaskMemAlloced(task), task->task_flags, task->display_flags, task->win_inhibit;
|
||||
if (!verbose)
|
||||
"%h*c%08X %04X:%04X:%08X\n", indent + 2, CH_SPACE,
|
||||
TaskMemAlloced(task), task->task_flags, task->display_flags, task->win_inhibit;
|
||||
else
|
||||
{
|
||||
"%h*cMemory Allocated: 0x%08X\n", indent + 2, CH_SPACE, TaskMemAlloced(task);
|
||||
"%h*cMemory Used: 0x%08X\n", indent + 2, CH_SPACE, TaskMemUsed(task);
|
||||
"%h*cTask Flags: 0x%04X\n", indent + 2, CH_SPACE, task->task_flags;
|
||||
for (i = 0; i < TASKf_FLAGS_NUM; i++)
|
||||
if (Bt(&task->task_flags, i))
|
||||
"%h*c+ %Z\n", indent + 4, CH_SPACE, i, "ST_TASK_FLAGS";
|
||||
|
||||
"%h*cDisplay Flags: 0x%04X\n", indent + 2, CH_SPACE, task->display_flags;
|
||||
for (i = 0; i < DISPLAYf_FLAGS_NUM; i++)
|
||||
if (Bt(&task->display_flags, i))
|
||||
"%h*c+ %Z\n", indent + 4, CH_SPACE, i, "ST_DISPLAY_FLAGS";
|
||||
|
||||
"%h*cWindow Inhibit: 0x%08X\n", indent + 2, CH_SPACE, task->win_inhibit;
|
||||
for (i = 0; i < WIf_FLAGS_NUM; i++)
|
||||
if (Bt(&task->win_inhibit, i))
|
||||
"%h*c- %Z\n", indent + 4, CH_SPACE, i, "ST_WIN_INHIBIT_FLAGS";
|
||||
}
|
||||
|
||||
task1 = task->next_child_task;
|
||||
while (task1 != (&task->next_child_task)(U8 *) - offset(CTask.next_sibling_task))
|
||||
{
|
||||
TaskRepTask(task1, indent + 2);
|
||||
TaskRepTask(task1, indent + 2, verbose);
|
||||
task1 = task1->next_sibling_task;
|
||||
}
|
||||
}
|
||||
|
||||
public U0 TaskRep()
|
||||
public U0 TaskRep(Bool verbose=FALSE)
|
||||
{//Report current tasks on all cores.
|
||||
I64 i;
|
||||
CCPU *c;
|
||||
|
@ -34,7 +58,7 @@ public U0 TaskRep()
|
|||
"$$PURPLE$$CPU%02X$$FG$$\n", i;
|
||||
else
|
||||
"CPU%02X\n", i;
|
||||
TaskRepTask(c->executive_task, 2);
|
||||
TaskRepTask(c->executive_task, 2, verbose);
|
||||
}
|
||||
POPFD
|
||||
}
|
||||
|
|
|
@ -885,7 +885,7 @@ wmt_start:
|
|||
}
|
||||
}
|
||||
|
||||
if (!Bt(&task->win_inhibit,WIf_SELF_MS_R)&&
|
||||
if (!Bt(&task->win_inhibit, WIf_SELF_MS_R) &&
|
||||
(!TaskValidate(sys_focus_task) ||
|
||||
!Bt(&sys_focus_task->win_inhibit, WIf_FOCUS_TASK_MS_R)))
|
||||
{
|
||||
|
@ -928,7 +928,7 @@ wmt_start:
|
|||
}
|
||||
}
|
||||
|
||||
if (!Bt(&task->win_inhibit,WIf_SELF_BORDER) && has_border &&
|
||||
if (!Bt(&task->win_inhibit, WIf_SELF_BORDER) && has_border &&
|
||||
(!TaskValidate(sys_focus_task) ||
|
||||
!Bt(&sys_focus_task->win_inhibit, WIf_FOCUS_TASK_BORDER)))
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue