Re: How do disk writes work these days?
Re: How do disk writes work these days?
- Subject: Re: How do disk writes work these days?
- From: Quinn <email@hidden>
- Date: Tue, 30 Jul 2002 16:15:53 +0100
At 16:38 +0200 30/7/02, Pelle Johansson wrote:
IMO, a much better way, in programs where it is possible, is to use
O_NONBLOCK (in either open() or fcntl()) and select() to check for
writable file descriptors. [...]
Last I checked file descriptors that refer to files always trigger
select to return immediately (at least an Darwin systems). The
select system call eventually calls down to a file-system specific
routine (eg hfs_select, nfs_select), which always returns true. Take
a look...
<
http://www.opensource.apple.com/cgi-bin/registered/cvs/src/notlive/xnu/bsd/hfs/hfs_readwrite.c?rev=1.1.1.31&content-type=text/x-cvsweb-markup>
<
http://www.opensource.apple.com/cgi-bin/registered/cvs/src/notlive/xnu/bsd/nfs/nfs_vnops.c?rev=1.1.1.42&content-type=text/x-cvsweb-markup>
S+E
--
Quinn "The Eskimo!" <
http://www.apple.com/developer/>
Apple Developer Technical Support * Networking, Communications, Hardware
_______________________________________________
darwin-kernel mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/darwin-kernel
Do not post admin requests to the list. They will be ignored.