Changeset faf38b2 in mainline for uspace/app/ps/ps.c


Ignore:
Timestamp:
2010-04-09T09:41:39Z (14 years ago)
Author:
Stanislav Kozina <stanislav.kozina@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
638927a
Parents:
a325832
Message:

Removed thread selection from kernel.
Now all threads are copied to uspace and then selected.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/app/ps/ps.c

    ra325832 rfaf38b2  
    9999        int thread_count = THREAD_COUNT;
    100100        thread_info_t *threads = malloc(thread_count * sizeof(thread_info_t));
    101         int result = get_task_threads(taskid, threads, sizeof(thread_info_t) * thread_count);
     101        int result = get_task_threads(threads, sizeof(thread_info_t) * thread_count);
    102102
    103103        while (result > thread_count) {
    104104                thread_count *= 2;
    105105                threads = realloc(threads, thread_count * sizeof(thread_info_t));
    106                 result = get_task_threads(taskid, threads, sizeof(thread_info_t) * thread_count);
     106                result = get_task_threads(threads, sizeof(thread_info_t) * thread_count);
    107107        }
    108108
     
    115115        printf("    ID    State  CPU   Prio    [k]uCycles    [k]kcycles   Cycle fault\n");
    116116        for (i = 0; i < result; ++i) {
     117                if (threads[i].taskid != taskid) {
     118                        continue;
     119                }
    117120                uint64_t ucycles, kcycles;
    118121                char usuffix, ksuffix;
Note: See TracChangeset for help on using the changeset viewer.