From 1ab2b56758d06c5460a25cd55ce471c98ee78d72 Mon Sep 17 00:00:00 2001 From: horchi Date: Thu, 22 Jun 2017 05:55:33 +0200 Subject: 2017-06-22 version 1.1.69 (horchi)\n - change: More rework of lock handling\n\n --- lib/vdrlocks.h | 31 ++++++++++++++++++++++++++++++- 1 file changed, 30 insertions(+), 1 deletion(-) (limited to 'lib/vdrlocks.h') 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 -- cgit v1.2.3