summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2017-06-07 12:31:31 +0200
committerKlaus Schmidinger <vdr@tvdr.de>2017-06-07 12:31:31 +0200
commitc0b8666d1fe1a5f83ba7a09ad68fcc6e811b7e12 (patch)
tree235e53af10ac2ef70dde4ed32016c1307b6b4fe8
parent210df9d83595b168749a1ca3651057fc6357f22a (diff)
downloadvdr-c0b8666d1fe1a5f83ba7a09ad68fcc6e811b7e12.tar.gz
vdr-c0b8666d1fe1a5f83ba7a09ad68fcc6e811b7e12.tar.bz2
Fixed false positives when checking the locking sequence, in case of nested locks within the same thread (cont'd)
-rw-r--r--thread.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/thread.c b/thread.c
index e6ae889e..c821526f 100644
--- a/thread.c
+++ b/thread.c
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: thread.c 4.5 2017/06/06 09:11:03 kls Exp $
+ * $Id: thread.c 4.6 2017/06/07 12:31:31 kls Exp $
*/
#include "thread.h"
@@ -633,7 +633,7 @@ void cStateLockLog::Check(const char *Name, bool Lock, bool Write)
{
if (!dumped && Name) {
int n = *Name - '0' - 1;
- if (0 < n && n < SLL_MAX_LIST) {
+ if (0 <= n && n < SLL_MAX_LIST) {
int b = 1 << n;
cMutexLock MutexLock(&mutex);
tThreadId ThreadId = cThread::ThreadId();
@@ -661,7 +661,7 @@ void cStateLockLog::Check(const char *Name, bool Lock, bool Write)
logThreadIds[logIndex] = ThreadId;
logFlags[logIndex] = flags[Index] | (Write ? SLL_WRITE_FLAG : 0);
#ifdef DEBUG_LOCKCALL
- strn0cpy(logCaller[logIndex], cBackTrace::GetCaller(Lock ? 5 : 3, true), SLL_LENGTH);
+ strn0cpy(logCaller[logIndex], cBackTrace::GetCaller(Lock ? 3 : 5, true), SLL_LENGTH);
#endif
if (++logIndex >= SLL_SIZE)
logIndex = 0;