MCPcopy Create free account
hub / github.com/HelenOS/helenos / task_print

Function task_print

kernel/generic/src/proc/task.c:629–662  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

627}
628
629static void task_print(task_t *task, bool additional)
630{
631 irq_spinlock_lock(&task->lock, false);
632
633 uint64_t ucycles;
634 uint64_t kcycles;
635 char usuffix, ksuffix;
636 task_get_accounting(task, &ucycles, &kcycles);
637 order_suffix(ucycles, &ucycles, &usuffix);
638 order_suffix(kcycles, &kcycles, &ksuffix);
639
640#ifdef __32_BITS__
641 if (additional)
642 printf("%-8" PRIu64 " %9zu", task->taskid,
643 atomic_load(&task->refcount));
644 else
645 printf("%-8" PRIu64 " %-14s %-5" PRIu32 " %10p %10p"
646 " %9" PRIu64 "%c %9" PRIu64 "%c\n", task->taskid,
647 task->name, task->container, task, task->as,
648 ucycles, usuffix, kcycles, ksuffix);
649#endif
650
651#ifdef __64_BITS__
652 if (additional)
653 printf("%-8" PRIu64 " %9" PRIu64 "%c %9" PRIu64 "%c "
654 "%9zu\n", task->taskid, ucycles, usuffix, kcycles,
655 ksuffix, atomic_load(&task->refcount));
656 else
657 printf("%-8" PRIu64 " %-14s %-5" PRIu32 " %18p %18p\n",
658 task->taskid, task->name, task->container, task, task->as);
659#endif
660
661 irq_spinlock_unlock(&task->lock, false);
662}
663
664/** Print task list
665 *

Callers 1

task_print_listFunction · 0.85

Calls 5

irq_spinlock_lockFunction · 0.85
task_get_accountingFunction · 0.85
irq_spinlock_unlockFunction · 0.85
order_suffixFunction · 0.50
printfFunction · 0.50

Tested by

no test coverage detected