summaryrefslogtreecommitdiff
path: root/lib/vdrlocks.h
blob: d499bc7199054eafc2ff4c380a3e14e11a6f60d9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
/*
 * vdrlocks.h
 *
 * See the README file for copyright information and how to reach the author.
 *
 */

#ifndef __VDRLOCKS_H
#  define __VDRLOCKS_H

#  ifdef VDR_PLUGIN

#  include <vdr/config.h>
#  include <vdr/tools.h>


#if defined (APIVERSNUM) && (APIVERSNUM >= 20301)
#  define GET_TIMERS_READ(name) USE_LIST_LOCK_READ(Timers);  \
   const cTimers* name = Timers;
#else
#  define GET_TIMERS_READ cTimers* timers = &Timers;
#endif

#if defined (APIVERSNUM) && (APIVERSNUM >= 20301)
#  define GET_TIMERS_WRITE(name) USE_LIST_LOCK_WRITE(Timers);   \
   cTimers* name = Timers;
#else
#  define GET_TIMERS_READ cTimers* timers = &Timers;
#endif

//***************************************************************************
#  endif // VDR_PLUGIN

#endif //___VDRLOCKS_H