Re: [vdr] [PATCH] Use cThread::mutex with absolute cCondVar::TimedWait()

2023-02-15 Thread Klaus Schmidinger
On 22.01.23 13:52, Marko Mäkelä wrote: Hi, I would propose the following patch, or some equivalent interface that would allow cThread::mutex to be used with some cCondVar in derived classes: diff --git a/thread.h b/thread.h index 16c4bd75..cd1d98ab 100644 --- a/thread.h +++ b/thread.h @@

Re: [vdr] [PATCH] Fix cThread related race conditions

2023-02-15 Thread Klaus Schmidinger
On 02.02.23 21:56, Patrick Lerda wrote: ... diff --git a/thread.c b/thread.c index 93eb8c0..21be7a4 100644 --- a/thread.c +++ b/thread.c @@ -312,13 +312,16 @@ bool cThread::Start(void) cCondWait::SleepMs(THREAD_STOP_SLEEP); } if (!active) { -active =

Re: [vdr] [PATCH] Add thread safety to cRingBufferLinear

2023-02-15 Thread Klaus Schmidinger
On 09.02.23 23:31, Patrick Lerda wrote: ... This is really related to the C++ thread safety model, the patch below fixes the main cRingBufferLinear issue: diff --git a/ringbuffer.h b/ringbuffer.h index 746fc51..a3fa499 100644 --- a/ringbuffer.h +++ b/ringbuffer.h @@ -10,6 +10,7 @@  #ifndef