diff options
Diffstat (limited to 'lib/vdrlocks.h')
-rw-r--r-- | lib/vdrlocks.h | 31 |
1 files changed, 30 insertions, 1 deletions
diff --git a/lib/vdrlocks.h b/lib/vdrlocks.h index a3a1f2b..5032f09 100644 --- a/lib/vdrlocks.h +++ b/lib/vdrlocks.h @@ -31,12 +31,41 @@ # define GET_TIMERS_WRITE(name) cTimers* name = &Timers; #endif - //*************************************************************************** // Channel List Lock Macros //*************************************************************************** +#if defined (APIVERSNUM) && (APIVERSNUM >= 20301) +# define GET_CHANNELS_READ(name) USE_LIST_LOCK_READ(Channels); \ + const cChannels* name = Channels; +#else +# define GET_CHANNELS_READ(name) cChannels* name = &Channels; +#endif + +#if defined (APIVERSNUM) && (APIVERSNUM >= 20301) +# define GET_CHANNELS_WRITE(name) USE_LIST_LOCK_WRITE(Channels); \ + cChannels* name = Channels; +#else +# define GET_CHANNELS_WRITE(name) cChannels* name = &Channels; +#endif + +//*************************************************************************** +// Recording List Lock Macros +//*************************************************************************** + +#if defined (APIVERSNUM) && (APIVERSNUM >= 20301) +# define GET_RECORDINGS_READ(name) USE_LIST_LOCK_READ(Recordings); \ + const cRecordings* name = Recordings; +#else +# define GET_RECORDINGS_READ(name) cRecordings* name = &Recordings; +#endif +#if defined (APIVERSNUM) && (APIVERSNUM >= 20301) +# define GET_RECORDINGS_WRITE(name) USE_LIST_LOCK_WRITE(Recordings); \ + cRecordings* name = Recordings; +#else +# define GET_RECORDINGS_WRITE(name) cRecordings* name = &Recordings; +#endif //*************************************************************************** # endif // VDR_PLUGIN |