git: 9front

Download patch

ref: bf543eaafd38859523d213dc8d33919a4af58b3e
parent: f132f03ffd8fedd539e9d5e149d951fa32061ec9
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;
--