shithub: riscv

Download patch

ref: 58f8d7874b01892553ac5679d6f784dc1fa0949b
parent: 04b78032914d58a33745a1a13e2e3de99a7d94b4
author: cinap_lenrek <[email protected]>
date: Sat Jun 22 05:53:14 EDT 2013

alarm: run checkalarms() only on cpu0 (from eriks alarm-once patch)

--- a/sys/src/9/port/alarm.c
+++ b/sys/src/9/port/alarm.c
@@ -37,7 +37,7 @@
 }
 
 /*
- *  called every clock tick
+ *  called every clock tick on cpu0
  */
 void
 checkalarms(void)
--- a/sys/src/9/port/portclock.c
+++ b/sys/src/9/port/portclock.c
@@ -153,7 +153,8 @@
 		exit(0);
 	}
 
-	checkalarms();
+	if(m->machno == 0)
+		checkalarms();
 
 	if(up && up->state == Running)
 		hzsched();	/* in proc.c */