diff options
author | Klaus Schmidinger <vdr@tvdr.de> | 2017-03-19 13:11:39 +0100 |
---|---|---|
committer | Klaus Schmidinger <vdr@tvdr.de> | 2017-03-19 13:11:39 +0100 |
commit | 367557039aae419f28c2ff44700f77bec8f498e4 (patch) | |
tree | 2626da5314a55097b697da75a0dd8bf646b910b3 /ringbuffer.c | |
parent | 31b0feae145a943e4fb99d5fa2e2f83466516606 (diff) | |
download | vdr-367557039aae419f28c2ff44700f77bec8f498e4.tar.gz vdr-367557039aae419f28c2ff44700f77bec8f498e4.tar.bz2 |
The function cRingBufferLinear::Clear() can now be called safely from the reading thread, without additional locking
Diffstat (limited to 'ringbuffer.c')
-rw-r--r-- | ringbuffer.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/ringbuffer.c b/ringbuffer.c index d33a4719..902c8878 100644 --- a/ringbuffer.c +++ b/ringbuffer.c @@ -7,7 +7,7 @@ * Parts of this file were inspired by the 'ringbuffy.c' from the * LinuxDVB driver (see linuxtv.org). * - * $Id: ringbuffer.c 4.1 2016/12/22 10:26:13 kls Exp $ + * $Id: ringbuffer.c 4.2 2017/03/19 12:43:36 kls Exp $ */ #include "ringbuffer.h" @@ -216,9 +216,10 @@ int cRingBufferLinear::Available(void) void cRingBufferLinear::Clear(void) { - tail = head = margin; + int Head = head; + tail = Head; #ifdef DEBUGRINGBUFFERS - lastHead = head; + lastHead = Head; lastTail = tail; lastPut = lastGet = -1; #endif |