From f414acdadb344f39285e26f0ce8861764efadde1 Mon Sep 17 00:00:00 2001 From: horchi Date: Sun, 11 Jun 2017 18:08:02 +0200 Subject: 2017-06-11: version 1.1.68 (horchi)\n - change: Added lock macros for easier handling the vdr versions\n\n --- lib/vdrlocks.h | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 lib/vdrlocks.h (limited to 'lib') diff --git a/lib/vdrlocks.h b/lib/vdrlocks.h new file mode 100644 index 0000000..d499bc7 --- /dev/null +++ b/lib/vdrlocks.h @@ -0,0 +1,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 +# include + + +#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 -- cgit v1.2.3