sched: Remove pidhash_s and move ticks to tcb_s

simplify the code logic and reduce memory a little bit

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
This commit is contained in:
Xiang Xiao
2021-10-14 11:03:07 +08:00
committed by Gustavo Henrique Nihei
parent 13741c9017
commit 8b67944c75
11 changed files with 43 additions and 91 deletions
+1 -1
View File
@@ -110,7 +110,7 @@ end
define esp32_bt_pid
set $_pid = $arg0
set $_tcb = g_pidhash[$_pid].tcb
set $_tcb = g_pidhash[$_pid]
if ($_tcb->pid == $_pid)
set $_regs = $_tcb->xcp.regs
printf "PID %d NAME %s\n", $_pid, $_tcb.name
+2 -2
View File
@@ -54,7 +54,7 @@ define _examine_target
if ($_target_examined == 0x0)
_examine_arch
set $_tcb0 = g_pidhash[0].tcb
set $_tcb0 = g_pidhash[0]
set $_xcp_nregs = sizeof($_tcb0->xcp.regs) / sizeof($_tcb0->xcp.regs[0])
set $_target_has_fpu = 0
@@ -385,7 +385,7 @@ define nxthread
_examine_target
_save_current_tcb
set $hash = ($arg0 & ($_target_max_tasks - 1))
set $tcb = g_pidhash[$hash].tcb
set $tcb = g_pidhash[$hash]
if ($tcb != 0x0)
_print_thread $tcb
if ($argc == 1)