From owner-freebsd-arch@FreeBSD.ORG Tue Aug 16 14:20:03 2005 Return-Path: X-Original-To: freebsd-arch@FreeBSD.org Delivered-To: freebsd-arch@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 654B316A41F; Tue, 16 Aug 2005 14:20:03 +0000 (GMT) (envelope-from m.ehinger@ltur.de) Received: from posty.gateway-inter.net (posty.gateway-inter.net [213.144.19.86]) by mx1.FreeBSD.org (Postfix) with ESMTP id E9FFD43D45; Tue, 16 Aug 2005 14:20:02 +0000 (GMT) (envelope-from m.ehinger@ltur.de) In-Reply-To: <11638.1124199342@phk.freebsd.dk> To: "Poul-Henning Kamp" Message-ID: From: m.ehinger@ltur.de Date: Tue, 16 Aug 2005 16:19:26 +0200 MIME-Version: 1.0 Content-type: text/plain; charset=US-ASCII Cc: Pawel Jakub Dawidek , freebsd-arch@FreeBSD.org Subject: Re: sysctl_proc calls handler twice X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Aug 2005 14:20:03 -0000 Thanks for all answers, that more details than i needed. I got around the problem by checking an external variable. Here comes the hole story if somebody cares. (but be warned my english isn't the best) I wrote an driver for the Accelerometers used in Thinkpad and just want to see the data returned. So i created an sysctl proc which will read the data and return it. The problem was that the two calls to the proc are to close, i forgot to check if the Accelerometer has already finished its last run. So i want to write to the Accelerometer although he wasn't ready for that. With sysctlbyname i got no errors because the program itself took enough time between the calls. I now check if the previous command has finished before i send the new one so the double call isn't a probleme anymore. Any questions? thanks again for the answers maik "Poul-Henning Kamp" Gesendet von: phk@phk.freebsd.dk An Bruce Evans 16.08.2005 15:35 Kopie m.ehinger@ltur.de, Pawel Jakub Dawidek , freebsd-arch@FreeBSD.org Thema Re: sysctl_proc calls handler twice In message <20050816221033.C47830@delplex.bde.org>, Bruce Evans writes: > Only the last 2 of these calls reach the handler. Proc handlers are > only special here in that they are more specialized than the integer > handlers. Strictly speaking it is the other way arond: since integer handlers are implemented in terms of proc handlers, it follows that proc handlers cannot be more specialized than integer handlers. -- Poul-Henning Kamp | UNIX since Zilog Zeus 3.20 phk@FreeBSD.ORG | TCP/IP since RFC 956 FreeBSD committer | BSD since 4.3-tahoe Never attribute to malice what can adequately be explained by incompetence.