From 4e04aeecc84119d57594d669a35976d12446c65f Mon Sep 17 00:00:00 2001 From: Stefan Lankes Date: Mon, 1 Feb 2016 02:29:23 +0100 Subject: [PATCH] cores goes into the halt state after the termination of the application --- hermit/kernel/main.c | 10 ++++++++-- hermit/kernel/tasks.c | 2 +- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/hermit/kernel/main.c b/hermit/kernel/main.c index fc62a1a51..050b7a254 100644 --- a/hermit/kernel/main.c +++ b/hermit/kernel/main.c @@ -219,7 +219,10 @@ int smp_main(void) while(1) { check_workqueues(); - HALT; + if (libc_sd >= 0) + PAUSE; + else + HALT; } return 0; @@ -467,7 +470,10 @@ int hermit_main(void) while(1) { check_workqueues(); - HALT; + if (libc_sd >= 0) + PAUSE; + else + HALT; } return 0; diff --git a/hermit/kernel/tasks.c b/hermit/kernel/tasks.c index f0200f89a..858452d49 100644 --- a/hermit/kernel/tasks.c +++ b/hermit/kernel/tasks.c @@ -579,7 +579,7 @@ int wakeup_task(tid_t id) } spinlock_irqsave_unlock(&readyqueues[core_id].lock); -#ifdef DYNAMIC_TICKS +#if 0 //def DYNAMIC_TICKS // send IPI to be sure that the scheuler recognize the new task if (core_id != CORE_ID) apic_send_ipi(core_id, 121);