summaryrefslogtreecommitdiff
path: root/status.h
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2017-06-21 09:40:39 +0200
committerKlaus Schmidinger <vdr@tvdr.de>2017-06-21 09:40:39 +0200
commit1bce4993838365a839c58ea3c3a9452298c8ba8c (patch)
tree6026b0bb9afe5b28207e9e8ea64012229573405d /status.h
parent699c073d8557b2daec5c3b41ff559e91d141c101 (diff)
downloadvdr-1bce4993838365a839c58ea3c3a9452298c8ba8c.tar.gz
vdr-1bce4993838365a839c58ea3c3a9452298c8ba8c.tar.bz2
Added some missing locks when calling functions from cStatus or cSkin*
Diffstat (limited to 'status.h')
-rw-r--r--status.h13
1 files changed, 12 insertions, 1 deletions
diff --git a/status.h b/status.h
index 6d1b9df5..32a9c2ad 100644
--- a/status.h
+++ b/status.h
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: status.h 4.1 2015/08/02 10:34:44 kls Exp $
+ * $Id: status.h 4.2 2017/06/21 09:40:20 kls Exp $
*/
#ifndef __STATUS_H
@@ -15,6 +15,17 @@
#include "player.h"
#include "tools.h"
+// Several member functions of the following classes are called with a pointer to
+// an object from a global list (cTimer, cChannel, cRecording or cEvent). In these
+// cases the core VDR code holds a lock on the respective list. The called function
+// may itself set a read lock (not a write lock!) on this list, because read locks
+// can be nested. It may also set read locks (not write locks!) on higher order lists.
+// For instance, a function that is called with a cChannel may lock cRecordings and/or
+// cSchedules (which contains cEvent objects), but not cTimers. If a plugin needs to
+// set locks of its own (on mutexes defined inside the plugin code), it shall do so
+// after setting any locks on VDR's global lists, and it shall always set these
+// locks in the same sequence, to avoid deadlocks.
+
enum eTimerChange { tcMod, tcAdd, tcDel }; // tcMod is obsolete and no longer used!
class cTimer;