shithub: riscv

Download patch

ref: 2e05af858ec745ffc174e503148ef7928f697c22
parent: 91d03436276fd2239670fdea902c761f31ea7a72
author: spew <devnull@localhost>
date: Sun Jul 1 19:35:23 EDT 2018

ape: improve setitimer

--- a/sys/src/ape/lib/bsd/getitimer.c
+++ b/sys/src/ape/lib/bsd/getitimer.c
@@ -21,7 +21,7 @@
 };
 
 void
-timerloop(Timer *timer, const struct timeval tval)
+timerloop(int signal, const struct timeval tval)
 {
 	pid_t ppid;
 	struct timespec t, s;
@@ -31,7 +31,7 @@
 	t.tv_nsec = tval.tv_usec*1000;
 	for(;;){
 		nanosleep(&t, &s);
-		kill(ppid, timer->signal);
+		kill(ppid, signal);
 	}
 }
 
@@ -64,7 +64,7 @@
 		errno = EFAULT;
 		return -1;
 	case 0:
-		timerloop(timer, new->it_interval);
+		timerloop(timer->signal, new->it_interval);
 		exit(0);
 	}
 	return 0;