Changeset ff14c520 in mainline for generic/src/proc/thread.c


Ignore:
Timestamp:
2006-03-16T22:31:39Z (19 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
93165be
Parents:
37c57f2
Message:

It is now possible to associate symbolic names with both threads and tasks.
More verbose kconsole threads, tasks and scheduler commands.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • generic/src/proc/thread.c

    r37c57f2 rff14c520  
    249249 * @param task  Task to which the thread belongs.
    250250 * @param flags Thread flags.
     251 * @param name  Symbolic name.
    251252 *
    252253 * @return New thread's structure on success, NULL on failure.
    253254 *
    254255 */
    255 thread_t *thread_create(void (* func)(void *), void *arg, task_t *task, int flags)
     256thread_t *thread_create(void (* func)(void *), void *arg, task_t *task, int flags, char *name)
    256257{
    257258        thread_t *t;
     
    280281        interrupts_restore(ipl);
    281282       
     283        t->name = name;
    282284        t->thread_code = func;
    283285        t->thread_arg = arg;
     
    410412        for (cur=threads_head.next; cur!=&threads_head; cur=cur->next) {
    411413                t = list_get_instance(cur, thread_t, threads_link);
    412                 printf("Thr: %d(%s) ", t->tid, thread_states[t->state]);
     414                printf("%s: address=%P, tid=%d, state=%s, task=%P, code=%P, stack=%P, cpu=",
     415                        t->name, t, t->tid, thread_states[t->state], t->task, t->thread_code, t->kstack);
    413416                if (t->cpu)
    414417                        printf("cpu%d ", t->cpu->id);
     418                else
     419                        printf("none");
    415420                printf("\n");
    416421        }
Note: See TracChangeset for help on using the changeset viewer.