diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2009-03-08 00:45:45 +0000 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2009-03-08 00:45:45 +0000 |
commit | a936475949e45df42a2f60bf6d4b1f9978ba8468 (patch) | |
tree | 44e9cbe3672d534f0ebfaf5c36704b19f1302ddd /libavutil | |
parent | 616e899c43aae243241369100d2b31c87aafe711 (diff) | |
download | ffmpeg-a936475949e45df42a2f60bf6d4b1f9978ba8468.tar.gz |
Comments to indicate where memory barriers may be needed.
Originally committed as revision 17867 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavutil')
-rw-r--r-- | libavutil/fifo.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/libavutil/fifo.c b/libavutil/fifo.c index 4bc8be07ff..8436b3b6a4 100644 --- a/libavutil/fifo.c +++ b/libavutil/fifo.c @@ -91,6 +91,7 @@ int av_fifo_generic_write(AVFifoBuffer *f, void *src, int size, int (*func)(void memcpy(f->wptr, src, len); src = (uint8_t*)src + len; } +// Write memory barrier needed for SMP here in theory f->wptr += len; if (f->wptr >= f->end) f->wptr = f->buffer; @@ -103,6 +104,7 @@ int av_fifo_generic_write(AVFifoBuffer *f, void *src, int size, int (*func)(void int av_fifo_generic_read(AVFifoBuffer *f, int buf_size, void (*func)(void*, void*, int), void* dest) { +// Read memory barrier needed for SMP here in theory do { int len = FFMIN(f->end - f->rptr, buf_size); if(func) func(dest, f->rptr, len); @@ -110,6 +112,7 @@ int av_fifo_generic_read(AVFifoBuffer *f, int buf_size, void (*func)(void*, void memcpy(dest, f->rptr, len); dest = (uint8_t*)dest + len; } +// memory barrier needed for SMP here in theory av_fifo_drain(f, len); buf_size -= len; } while (buf_size > 0); |