httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Brian Havard" <>
Subject Re: Buffered file I/O & thread safety
Date Mon, 12 Jun 2000 12:22:31 GMT
On Mon, 12 Jun 2000 04:24:21 -0700 (PDT), dean gaudet wrote:

>On Sun, 11 Jun 2000 wrote:
>> No, this is a flag that will need to be set on the open call.  The open
>> basically does nothing but checking flags.  I dislike thoroughly having
>> multiple versions of the same functions just to not have mutex locking.
>i dislike having tonnes of flag checking.  i don't see the point in
>supporting mutexes.
>it's really unfortunate, for example, that logging is going to require a
>userland mutex...

Only if APR_BUFFERED is turned on, something we most likely won't do for

>when on unix an O_APPEND file has atomicity provided by
>the kerenl already...

And this is assumed to be true in non-buffered mode. A mutex is only used
in buffered mode.

>so any userland locks are merely Yet More cache-line
>activity which isn't required.  (i don't know about other operating
>systems, but i'd be surprised if unix is alone with this feature.)

It's not.

>this is one of those areas where i think that APR is too much, and isn't
>the minimum it could be.
>i've said before there's a reason for having both open/read/write/close
>and having fopen/fread/fwrite/fclose.

And that reason is? I think it's much simpler to have one configurable open
function. That way you can switch features on & off without having to
modify every use of the handle to use the other function call (open/fopen,
read/fread etc).

 |  Brian Havard                 |  "He is not the messiah!                   |
 |  |  He's a very naughty boy!" - Life of Brian |

View raw message