560,10 → 560,13 |
ipl = interrupts_disable(); |
spinlock_lock(&threads_lock); |
|
printf("tid name address state task ctx code stack cycles cpu kstack waitqueue\n"); |
printf("------ ---------- ---------- -------- ---------- --- ---------- ---------- ---------- ---- ---------- ----------\n"); |
printf("tid name address state task ctx code " |
" stack cycles cpu kstack waitqueue\n"); |
printf("------ ---------- ---------- -------- ---------- --- --------" |
"-- ---------- ---------- ---- ---------- ----------\n"); |
|
for (cur = threads_btree.leaf_head.next; cur != &threads_btree.leaf_head; cur = cur->next) { |
for (cur = threads_btree.leaf_head.next; |
cur != &threads_btree.leaf_head; cur = cur->next) { |
btree_node_t *node; |
int i; |
|
577,7 → 580,10 |
char suffix; |
order(t->cycles, &cycles, &suffix); |
|
printf("%-6zd %-10s %#10zx %-8s %#10zx %-3ld %#10zx %#10zx %9llu%c ", t->tid, t->name, t, thread_states[t->state], t->task, t->task->context, t->thread_code, t->kstack, cycles, suffix); |
printf("%-6zd %-10s %#10zx %-8s %#10zx %-3ld %#10zx " |
"%#10zx %9llu%c ", t->tid, t->name, t, |
thread_states[t->state], t->task, t->task->context, |
t->thread_code, t->kstack, cycles, suffix); |
|
if (t->cpu) |
printf("%-4zd", t->cpu->id); |
585,7 → 591,8 |
printf("none"); |
|
if (t->state == Sleeping) |
printf(" %#10zx %#10zx", t->kstack, t->sleep_queue); |
printf(" %#10zx %#10zx", t->kstack, |
t->sleep_queue); |
|
printf("\n"); |
} |
608,7 → 615,8 |
{ |
btree_node_t *leaf; |
|
return btree_search(&threads_btree, (btree_key_t) ((uintptr_t) t), &leaf) != NULL; |
return btree_search(&threads_btree, (btree_key_t) ((uintptr_t) t), |
&leaf) != NULL; |
} |
|
|
647,7 → 655,9 |
return (unative_t) rc; |
} |
|
if ((t = thread_create(uinit, kernel_uarg, TASK, THREAD_FLAG_USPACE, namebuf, false))) { |
t = thread_create(uinit, kernel_uarg, TASK, THREAD_FLAG_USPACE, namebuf, |
false); |
if (t) { |
tid = t->tid; |
thread_ready(t); |
return (unative_t) tid; |
670,3 → 680,4 |
|
/** @} |
*/ |
|