simplify and remove case where callhzclock could be set without hzclock being called Reference: /n/atom/patch/applied/timerintersimple Date: Thu Mar 27 07:14:17 CET 2014 Signed-off-by: quanstro@quanstro.net --- /sys/src/nix/port/portclock.c Thu Mar 27 07:14:12 2014 +++ /sys/src/nix/port/portclock.c Thu Mar 27 07:14:13 2014 @@ -197,10 +197,7 @@ when = t->twhen; if(when > now){ timerset(when); - iunlock(tt); - if(callhzclock) - hzclock(u); - return; + break; } tt->head = t->tnext; assert(t->tt == tt); @@ -209,12 +206,14 @@ if(t->tf) (*t->tf)(u, t); else - callhzclock++; + callhzclock = 1; ilock(tt); if(t->tmode == Tperiodic) tadd(tt, t); } iunlock(tt); + if(callhzclock) + hzclock(u); } void