apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bojan Smojver <bo...@rexursive.com>
Subject Regarding apr_file_writev() and locking...
Date Fri, 11 May 2007 03:39:15 GMT
At present, we have in this function:

if (thefile->buffered) {
  adjust various buffer offsets

If two threads do this for the same file (i.e. apr_file_t*), offsets may
end up screwed. Shouldn't we surround this with lock/unlock, like we do
in apr_file_write()?

PS. Also, I think we can do this only for HAVE_WRITEV as in the other
case apr_file_write() will take care of the whole thing (i.e. that
function already has a buffered path).


View raw message