Implemented strict locking of global lists

This commit is contained in:
Klaus Schmidinger
2015-09-01 11:14:27 +02:00
parent 8a7bc6a0bb
commit 3cd5294d8a
41 changed files with 3512 additions and 2402 deletions

View File

@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
* $Id: filter.h 4.1 2015/03/17 15:00:08 kls Exp $
* $Id: filter.h 4.2 2015/07/25 10:03:44 kls Exp $
*/
#ifndef __FILTER_H
@@ -15,13 +15,18 @@
class cSectionSyncer {
private:
int lastVersion;
int thisVersion;
int nextNumber;
int currentVersion;
int currentSection;
bool synced;
bool complete;
uchar sections[32]; // holds 32 * 8 = 256 bits, as flags for the sections
void SetSectionFlag(uchar Section, bool On) { if (On) sections[Section / 8] |= (1 << (Section % 8)); else sections[Section / 8] &= ~(1 << (Section % 8)); }
bool GetSectionFlag(uchar Section) { return sections[Section / 8] & (1 << (Section % 8)); }
public:
cSectionSyncer(void);
void Reset(void);
void Repeat(void);
bool Complete(void) { return complete; }
bool Sync(uchar Version, int Number, int LastNumber);
};