Static thread names.

This commit is contained in:
Geoffrey Challen
2016-03-05 08:46:00 -05:00
parent ca4b4de58b
commit e19a872c2b
3 changed files with 17 additions and 13 deletions

View File

@@ -66,10 +66,7 @@ fakethread_create(const char *name)
}
/* ignore most of the fields, zero everything for tidiness */
bzero(t, sizeof(*t));
t->t_name = kstrdup(name);
if (t->t_name == NULL) {
panic("threadlisttest: Out of memory\n");
}
strcpy(t->t_name, name);
t->t_stack = FAKE_MAGIC;
threadlistnode_init(&t->t_listnode, t);
return t;
@@ -84,7 +81,6 @@ fakethread_destroy(struct thread *t)
{
KASSERT(t->t_stack == FAKE_MAGIC);
threadlistnode_cleanup(&t->t_listnode);
kfree(t->t_name);
kfree(t);
}