From owner-cvs-src@FreeBSD.ORG Tue Apr 6 16:09:45 2004 Return-Path: Delivered-To: cvs-src@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id E8A3116A4CE; Tue, 6 Apr 2004 16:09:45 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id E303743D53; Tue, 6 Apr 2004 16:09:45 -0700 (PDT) (envelope-from cperciva@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.10/8.12.10) with ESMTP id i36N8nGe097229; Tue, 6 Apr 2004 16:08:49 -0700 (PDT) (envelope-from cperciva@repoman.freebsd.org) Received: (from cperciva@localhost) by repoman.freebsd.org (8.12.10/8.12.10/Submit) id i36N8nMU097228; Tue, 6 Apr 2004 16:08:49 -0700 (PDT) (envelope-from cperciva) Message-Id: <200404062308.i36N8nMU097228@repoman.freebsd.org> From: Colin Percival Date: Tue, 6 Apr 2004 16:08:49 -0700 (PDT) To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org X-FreeBSD-CVS-Branch: HEAD Subject: cvs commit: src/sys/kern kern_timeout.c src/sys/sys callout.h src/share/man/man9 timeout.9 X-BeenThere: cvs-src@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Apr 2004 23:09:46 -0000 cperciva 2004/04/06 16:08:49 PDT FreeBSD src repository Modified files: sys/kern kern_timeout.c sys/sys callout.h share/man/man9 timeout.9 Log: Introduce a callout_drain() function. This acts in the same manner as callout_stop(), except that if the callout being stopped is currently in progress, it blocks attempts to reset the callout and waits until the callout is completed before it returns. This makes it possible to clean up callout-using code safely, e.g., without potentially freeing memory which is still being used by a callout. Reviewed by: mux, gallatin, rwatson, jhb Revision Changes Path 1.21 +18 -11 src/share/man/man9/timeout.9 1.86 +90 -1 src/sys/kern/kern_timeout.c 1.25 +3 -0 src/sys/sys/callout.h