Re: sysctl_proc calls handler twice
m.ehinger_at_ltur.de
Date: 08/16/05
- Previous message: Poul-Henning Kamp: "Re: sysctl_proc calls handler twice"
- In reply to: Poul-Henning Kamp: "Re: sysctl_proc calls handler twice"
- Next in thread: Pawel Jakub Dawidek: "Re: sysctl_proc calls handler twice"
- Reply: Pawel Jakub Dawidek: "Re: sysctl_proc calls handler twice"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
To: "Poul-Henning Kamp" <phk@phk.freebsd.dk> Date: Tue, 16 Aug 2005 16:19:26 +0200
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" <phk@phk.freebsd.dk>
Gesendet von: phk@phk.freebsd.dk
An
Bruce Evans <bde@zeta.org.au>
16.08.2005 15:35 Kopie
m.ehinger@ltur.de, Pawel Jakub Dawidek <pjd@FreeBSD.org>,
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. _______________________________________________ freebsd-arch@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-arch To unsubscribe, send any mail to "freebsd-arch-unsubscribe@freebsd.org"
- Previous message: Poul-Henning Kamp: "Re: sysctl_proc calls handler twice"
- In reply to: Poul-Henning Kamp: "Re: sysctl_proc calls handler twice"
- Next in thread: Pawel Jakub Dawidek: "Re: sysctl_proc calls handler twice"
- Reply: Pawel Jakub Dawidek: "Re: sysctl_proc calls handler twice"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
- Re: sysctl_proc calls handler twice
... twice as many syscalls as sysctl; sysctldoesn't call handlers ... twice,
but sysctlcalls sysctlmany times 2 of these calls typically ... The data size is known in advance
for integer handlers, ... > allocated and second one is request for a real data.
... (freebsd-arch) - Re: sysctl_proc calls handler twice
... In message, Bruce Evans writes: ... Strictly speaking it is the other
way arond: since integer handlers ... are implemented in terms of proc handlers,
... (freebsd-arch)