shithub: riscv

Download patch

ref: 885d41dd7b87c41cb618140d50dd23501b6d4279
parent: 6cb359cc00bdc8204b011db46b8746c446f2c4de
author: cinap_lenrek <cinap_lenrek@felloff.net>
date: Sun Jan 22 16:08:28 EST 2017

sgi: get rid of timerset(0) case

--- a/sys/src/9/sgi/clock.c
+++ b/sys/src/9/sgi/clock.c
@@ -148,14 +148,10 @@
 {
 	long period;
 
-	if(next == 0)
+	period = next - fastticks(nil);
+	if(period < m->minperiod)
+		period = m->minperiod;
+	else if(period > m->maxperiod - m->minperiod)
 		period = m->maxperiod;
-	else {
-		period = next - fastticks(nil);
-		if(period > m->maxperiod)
-			period = m->maxperiod;
-		else if(period < m->minperiod)
-			period = m->minperiod;
-	}
 	wrcompare(rdcount()+period);
 }