aboutsummaryrefslogtreecommitdiff
path: root/src/sys/schedule.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/sys/schedule.c')
-rw-r--r--src/sys/schedule.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/sys/schedule.c b/src/sys/schedule.c
index 7dc2205..ac5b3e2 100644
--- a/src/sys/schedule.c
+++ b/src/sys/schedule.c
@@ -139,9 +139,9 @@ void cleanup(void)
if (scheduler.rthread_ll != 0) {
// Mark the thread as finished
struct Thread* t = scheduler.rthread_ll->data;
- uart_string("Cleaning up thread ");
- uart_10(t->data.pid);
- uart_char('\n');
+ //uart_string("Cleaning up thread ");
+ //uart_10(t->data.pid);
+ //uart_char('\n');
t->data.status = THREAD_FINISHED;
// Mark the stack space as free
unsigned long sidx = (unsigned long)(heap_end() - t->stack_base)/STACK_SIZE;
@@ -152,6 +152,7 @@ void cleanup(void)
struct LL* next = ll->next;
prev->next = ll->next;
next->prev = ll->prev;
+ free(ll->data);
free(ll);
scheduler.rthread_ll = 0;
}