From owner-p4-projects@FreeBSD.ORG Mon Sep 29 19:31:39 2014 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 8E302A13; Mon, 29 Sep 2014 19:31:39 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4F2C9A11 for ; Mon, 29 Sep 2014 19:31:39 +0000 (UTC) Received: from skunkworks.freebsd.org (skunkworks.freebsd.org [IPv6:2001:1900:2254:2068::682:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3BDAFACE for ; Mon, 29 Sep 2014 19:31:39 +0000 (UTC) Received: from skunkworks.freebsd.org ([127.0.1.74]) by skunkworks.freebsd.org (8.14.9/8.14.9) with ESMTP id s8TJVddm015820 for ; Mon, 29 Sep 2014 19:31:39 GMT (envelope-from jhb@freebsd.org) Received: (from perforce@localhost) by skunkworks.freebsd.org (8.14.9/8.14.9/Submit) id s8TJVduX015817 for perforce@freebsd.org; Mon, 29 Sep 2014 19:31:39 GMT (envelope-from jhb@freebsd.org) Date: Mon, 29 Sep 2014 19:31:39 GMT Message-Id: <201409291931.s8TJVduX015817@skunkworks.freebsd.org> X-Authentication-Warning: skunkworks.freebsd.org: perforce set sender to jhb@freebsd.org using -f From: John Baldwin Subject: PERFORCE change 1200929 for review To: Perforce Change Reviews Precedence: bulk X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.18-1 List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Sep 2014 19:31:39 -0000 http://p4web.freebsd.org/@@1200929?ac=10 Change 1200929 by jhb@jhb_ralph on 2014/09/29 19:31:34 More edits. Affected files ... .. //depot/projects/smpng/share/man/man9/timeout.9#16 edit Differences ... ==== //depot/projects/smpng/share/man/man9/timeout.9#16 (text+ko) ==== @@ -132,8 +132,8 @@ This is normally done by rescheduling the subsequent call within the called function. .Pp -Callout functions are not permitted to sleep. -They may not acquire any sleepable locks, +Callout functions must not sleep. +They may not acquire sleepable locks, wait on condition variables, perform blocking allocation requests, or invoke any other action that might sleep. @@ -172,19 +172,16 @@ or .Fa rw parameter. +The associated lock must be held while stopping or rescheduling the +callout. The callout subsystem acquires the associated lock before calling the -callout function. -The subsystem then checks if the pending callout was cancelled -while it waited for the associated lock. -If the callout was cancelled, +callout function and releases it after the function returns. +If the callout was cancelled while the callout subsystem waited for the +associated lock, the callout function is not called and the associated lock is released. -If the callout was not cancelled, -the callout function is called and the associated lock is released by the -subsystem after the callout function returns. -The callout must only be cancelled or rescheduled while holding the -associated lock. -This guarantees that stopping or rescheduling a callout associated with a -lock will not race with the callout function itself. +This guarantees that stopping or rescheduling the callout will not race with +the callout function itself because the associated lock must be held to +stop or reschedule the callout. .Pp Only regular mutexes may be used with .Fn callout_init_mtx ;