httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Brian Havard" <>
Subject Re: Buffered I/O in APR
Date Sun, 09 Apr 2000 03:55:22 GMT
On Sat, 8 Apr 2000 16:34:20 -0400 (EDT), wrote:


>I will suggest not using the stdio buffering at all, because of the
>limitations on some platforms.  I think if we try to implement buffering
>with stdio on some platforms, and not others, we are asking for trouble.
>Thoughts?  If this is agreeable, and Brian would like to post his
>buffering code (unless it is already in the APR tree), somebody can get
>busy porting it.  This has one other major advantage, presumably, if OS/2
>and Unix are using the same buffering code, they _might_ be able to use
>the same code completely, thereby reducing code duplication in APR.

It's already/still in APR file_io/os2. The only thing that's not directly
portable is the use of critical sections (temporary suspension of all
threads in the process other than the currently running thread), used to
make it thread safe. A mutex semaphore can be used instead though and is
only actually needed if you want to use the same file handle in multiple
threads (EG logs).

Hang on Ryan, are we agreeing again? That's no fun.....

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

View raw message