[vlc-devel] [PATCH] non-blocking filewriter (version 2)

Jarmo Torvinen jarmo.torvinen at jutel.fi
Wed Apr 29 13:08:16 CEST 2009


Hi,

Thanks for the review. Here is the fixed version of the patch containing 
fixes to problems
higlighted by Rémi.
Other changes:
 - use fstat() to automatically detect whether it is a named pipe
 - the non-blocking mode is enabled only for named pipes
 - use block_FifoCount() instead of block_FifoSize() as the latter is no 
longer exported
  -> do you see any issues in using the block_FifoCount() as it is 
commented as being
 not thread safe in block.c? I guess in theory the Write() function could 
delete too many
 blocks when

There is still one warning on compilation:

file.c: In function ?ThreadWrite?:
file.c:234: warning: variable ?p_buffer? might be clobbered by ?longjmp? 
or ?vfork?

Which I'm not quite sure how to fix. I guess making the block_t *p_buffer; 
volatile
isn't the correct solution.

Jarmo Torvinen


-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0002-Non-blocking-file-writer-implementation.patch
Type: application/octet-stream
Size: 11092 bytes
Desc: not available
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20090429/602669c3/attachment.obj>


More information about the vlc-devel mailing list