Changes to use deadlock detection.

This commit is contained in:
Geoffrey Challen
2017-02-09 09:52:18 -05:00
parent 9986e07810
commit a0ecc1e7e5
4 changed files with 204 additions and 0 deletions

View File

@@ -140,6 +140,7 @@ thread_create(const char *name)
thread->t_context = NULL;
thread->t_cpu = NULL;
thread->t_proc = NULL;
HANGMAN_ACTORINIT(&thread->t_hangman, thread->t_name);
/* Interrupt state fields */
thread->t_in_interrupt = false;
@@ -239,6 +240,8 @@ cpu_create(unsigned hardware_number)
curcpu->c_curthread = curthread;
}
HANGMAN_ACTORINIT(&c->c_hangman, "cpu");
result = proc_addthread(kproc, c->c_curthread);
if (result) {
panic("cpu_create: proc_addthread:: %s\n", strerror(result));