From owner-freebsd-hackers Tue Jan 14 8:32:36 2003 Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 982B237B401 for ; Tue, 14 Jan 2003 08:32:35 -0800 (PST) Received: from mail.flarion.com (mail.flarion.com [63.103.94.23]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0D60E43F3F for ; Tue, 14 Jan 2003 08:32:35 -0800 (PST) (envelope-from M.Impett@flarion.com) Received: by rrmail01.lab.flarion.com with Internet Mail Service (5.5.2656.59) id ; Tue, 14 Jan 2003 11:32:30 -0500 Message-ID: <748C6D0A58C0F94CA63C198B6674697A1DE766@ftmail.lab.flarion.com> From: Matt Impett To: "'freebsd-hackers@freebsd.org'" Subject: questions about (un)timeout and callout* functions Date: Tue, 14 Jan 2003 11:32:28 -0500 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2656.59) Content-Type: text/plain; charset="iso-8859-1" Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Hello all, I am using freebsd 4.3 stable and have a few questions. First, from looking at the code I am guessing that the callout* functions (callout_reset, callout_stop, etc) are generally preferable to the timeout/untimeout calls. It looks to me that the main difference is that the new callout* functions allow the caller to allocate and maintain the callout_handles themselves. Is this true?? Second, I have a question about the exact meaning of the CALLOUT_PENDING and CALLOUT_ACTIVE flags. It looks to me like the CALLOUT_PENDING flag is cleared right before the callout is made. Then, there is an splx(s) immediately before the callout, so I am guessing that this is reason why there are two flags??? CALLOUT_PENDING is used to mark that softclock has made the callout, but then CALLOUT_ACTIVE is used by the handler to mark that the callout has been processed??? If this is true (or actually, even if it is not), is there any documentation (or recommendations) about the usage of these functions, including callout_deactivate. I tried looking through the kernel code that uses these to get an idea, but it looks like different pieces of code use these functions in different ways that aren't always obvious or consistent. thanks, matt To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message