Skip to content
Snippets Groups Projects
Commit 711ae3b6 authored by Kaspar Schleiser's avatar Kaspar Schleiser
Browse files

* thread: add some more debug statements

parent b1bf8fb8
No related branches found
No related tags found
No related merge requests found
......@@ -45,11 +45,16 @@ void thread_sleep() {
}
int thread_wakeup(int pid) {
DEBUG("thread_wakeup: Trying to wakeup PID %i...\n", pid);
int isr = inISR();
if (! isr) dINT();
if (! isr) {
DEBUG("thread_wakeup: Not in interrupt.\n");
dINT();
}
int result = sched_threads[pid]->status;
if (result == STATUS_SLEEPING) {
DEBUG("thread_wakeup: Thread is sleeping.\n");
sched_set_status((tcb*)sched_threads[pid], STATUS_RUNNING);
if (!isr) {
eINT();
......@@ -59,6 +64,7 @@ int thread_wakeup(int pid) {
}
return 0;
} else {
DEBUG("thread_wakeup: Thread is not sleeping!\n");
if (!isr) eINT();
return STATUS_NOT_FOUND;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment