Re: Multi-threading access to device drivers.
From: Poul-Henning Kamp (phk_at_phk.freebsd.dk)
Date: 11/07/04
- Previous message: Poul-Henning Kamp: "Re: Multi-threading access to device drivers."
- In reply to: Matthew Dillon: "Re: Multi-threading access to device drivers."
- Next in thread: Matthew Dillon: "Re: Multi-threading access to device drivers."
- Reply: Matthew Dillon: "Re: Multi-threading access to device drivers."
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
To: Matthew Dillon <dillon@apollo.backplane.com> Date: Sun, 07 Nov 2004 08:48:39 +0100
In message <200411070357.iA73vaqU040765@apollo.backplane.com>, Matthew Dillon writes:
>:As was quoted POSIX, the update should be atomic.. so my reading of
>:that is that you lock the fd, when you read the offset from the fd,
>:you need to also update the offset with the number of bytes read, so
>:that a racing read both doesn't drop any data, nor duplicate any data..
>:
>:i.e. single file with fixed records, it should be perfectly safe to
>:throw five threads looping doing a read processing of the records w/o
>:fear of duplicate records, or dropped records...
>:
>:And if we handle it in this manner, then you can allow multiple reads
>:into the driver...
>:
>:--
>: John-Mark Gurney Voice: +1 415 225 5579
>
> If it's a regular file [...]
BZZZT! Wrong, but thanks for playing. (We are talking devices here)
-- 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: Multi-threading access to device drivers."
- In reply to: Matthew Dillon: "Re: Multi-threading access to device drivers."
- Next in thread: Matthew Dillon: "Re: Multi-threading access to device drivers."
- Reply: Matthew Dillon: "Re: Multi-threading access to device drivers."
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|
|