summaryrefslogtreecommitdiff
path: root/ringbuffer.c
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2005-12-11 12:10:28 +0100
committerKlaus Schmidinger <vdr@tvdr.de>2005-12-11 12:10:28 +0100
commit72759ed1313982aaade3a380fe5beddfffc7824b (patch)
tree4ec561a605d146d62cec61be49068279c9ae2acb /ringbuffer.c
parent506b0de497f8abb407df3ff8a82d2253f8967c5d (diff)
downloadvdr-72759ed1313982aaade3a380fe5beddfffc7824b.tar.gz
vdr-72759ed1313982aaade3a380fe5beddfffc7824b.tar.bz2
Now using the gettid() syscall to get a thread's pid, so that we get a useful value on NPTL systems
Diffstat (limited to 'ringbuffer.c')
-rw-r--r--ringbuffer.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/ringbuffer.c b/ringbuffer.c
index 3473a9e7..167511a8 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 1.21 2004/10/15 13:49:25 kls Exp $
+ * $Id: ringbuffer.c 1.22 2005/12/10 10:55:26 kls Exp $
*/
#include "ringbuffer.h"
@@ -46,7 +46,7 @@ void cRingBuffer::UpdatePercentage(int Fill)
int percent = Fill * 100 / (Size() - 1) / PERCENTAGEDELTA * PERCENTAGEDELTA;
if (percent != lastPercent) {
if (percent >= PERCENTAGETHRESHOLD && percent > lastPercent || percent < PERCENTAGETHRESHOLD && lastPercent >= PERCENTAGETHRESHOLD) {
- dsyslog("buffer usage: %d%% (tid=%ld)", percent, getThreadTid);
+ dsyslog("buffer usage: %d%% (tid=%d)", percent, getThreadTid);
lastPercent = percent;
}
}
@@ -286,7 +286,7 @@ uchar *cRingBufferLinear::Get(int &Count)
uchar *p = NULL;
int Head = head;
if (getThreadTid <= 0)
- getThreadTid = pthread_self();
+ getThreadTid = cThread::ThreadId();
int rest = Size() - tail;
if (rest < margin && Head < tail) {
int t = margin - rest;