CVSROOT: /cvs Module name: src Changes by: d...@cvs.openbsd.org 2011/05/09 18:58:42
Modified files: sys/sys : timeout.h sys/kern : kern_timeout.c Log message: tweak timeout_del so it can tell the caller if it actually did remove a timeout or not. without this it is impossible to tell if the timeout was removed or if it is just about to run. if the caller of timeout_del is about to free some state the timeout itself might use, this could lead to a use after free. now if timeout_del returns 1, you know the timeout wont fire and you can proceed with cleanup. how you cope with the timeout being about to fire is up to the caller of timeout_del. discussed with drinking art and art, and most of k2k11 ok miod@