| 627 | } |
| 628 | |
| 629 | static 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 | * |
no test coverage detected