BarryServer : Git

All the code for all my projects
// BarryServer : Git / Nucleus / commit / ca4f3abc7b46ecf67b6a72e75989dc6eccead09a / task / time.c

// Related

Nucleus

Barry Multi-core scheduling ca4f3ab (3 years, 3 months ago)
diff --git a/task/time.c b/task/time.c
index 345b491..3f5a50a 100644
--- a/task/time.c
+++ b/task/time.c
@@ -15,14 +15,15 @@ uint8_t slice[MAX_CPUS] = {0};
 void
 timer_handler(struct InterruptFrame *frame)
 {
-	monotonic++;
+	if (CPUID == 0)
+		monotonic++;
 
 	if (!current)
 		return;
 	slice[CPUID]++;
 
 	/* Call scheduler */
-	if (slice[CPUID] < current->priority)
+	if (slice[CPUID] < (current->priority * 10))
 		return;
 	slice[CPUID] = 0;
 	schedule();