Rev 1787 | Rev 1839 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 1787 | Rev 1820 | ||
---|---|---|---|
Line 316... | Line 316... | ||
316 | t->saved_context.ipl = interrupts_read(); |
316 | t->saved_context.ipl = interrupts_read(); |
317 | interrupts_restore(ipl); |
317 | interrupts_restore(ipl); |
318 | 318 | ||
319 | memcpy(t->name, name, THREAD_NAME_BUFLEN); |
319 | memcpy(t->name, name, THREAD_NAME_BUFLEN); |
320 | 320 | ||
- | 321 | t->context = THE->context; |
|
321 | t->thread_code = func; |
322 | t->thread_code = func; |
322 | t->thread_arg = arg; |
323 | t->thread_arg = arg; |
323 | t->ticks = -1; |
324 | t->ticks = -1; |
324 | t->priority = -1; /* start in rq[0] */ |
325 | t->priority = -1; /* start in rq[0] */ |
325 | t->cpu = NULL; |
326 | t->cpu = NULL; |
Line 531... | Line 532... | ||
531 | node = list_get_instance(cur, btree_node_t, leaf_link); |
532 | node = list_get_instance(cur, btree_node_t, leaf_link); |
532 | for (i = 0; i < node->keys; i++) { |
533 | for (i = 0; i < node->keys; i++) { |
533 | thread_t *t; |
534 | thread_t *t; |
534 | 535 | ||
535 | t = (thread_t *) node->value[i]; |
536 | t = (thread_t *) node->value[i]; |
536 | printf("%s: address=%#zx, tid=%zd, state=%s, task=%#zx, code=%#zx, stack=%#zx, cpu=", |
537 | printf("%s: address=%#zx, tid=%zd, context=%ld, state=%s, task=%#zx, code=%#zx, stack=%#zx, cpu=", |
537 | t->name, t, t->tid, thread_states[t->state], t->task, t->thread_code, t->kstack); |
538 | t->name, t, t->tid, t->context, thread_states[t->state], t->task, t->thread_code, t->kstack); |
538 | if (t->cpu) |
539 | if (t->cpu) |
539 | printf("cpu%zd", t->cpu->id); |
540 | printf("cpu%zd", t->cpu->id); |
540 | else |
541 | else |
541 | printf("none"); |
542 | printf("none"); |
542 | if (t->state == Sleeping) { |
543 | if (t->state == Sleeping) { |