Update of /cvsroot/pure-data/pd/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27592
Modified Files: Tag: desiredata s_inter.c Log Message: fix invalid use of setitimer by sys_setalarm
Index: s_inter.c =================================================================== RCS file: /cvsroot/pure-data/pd/src/s_inter.c,v retrieving revision 1.5.4.10.2.25.2.24 retrieving revision 1.5.4.10.2.25.2.25 diff -C2 -d -r1.5.4.10.2.25.2.24 -r1.5.4.10.2.25.2.25 *** s_inter.c 3 Aug 2007 00:14:49 -0000 1.5.4.10.2.25.2.24 --- s_inter.c 17 Aug 2007 01:33:42 -0000 1.5.4.10.2.25.2.25 *************** *** 230,239 **** void sys_setalarm(int microsec) { struct itimerval it; ! it.it_interval.tv_sec = 0; it.it_interval.tv_usec = 0; ! it.it_value.tv_sec = 0; ! it.it_value.tv_usec = microsec; ! if (microsec) sys_signal(SIGALRM, sys_alarmhandler); ! else sys_signal(SIGALRM, SIG_IGN); setitimer(ITIMER_REAL, &it, 0); } --- 230,238 ---- void sys_setalarm(int microsec) { struct itimerval it; ! it.it_interval.tv_sec = 0; it.it_interval.tv_usec = 0; ! it.it_value.tv_sec = microsec/1000000; ! it.it_value.tv_usec = microsec%1000000; ! sys_signal(SIGALRM, microsec ? sys_alarmhandler : SIG_IGN); setitimer(ITIMER_REAL, &it, 0); }