[Xenomai-git] Philippe Gerum : include/boilerplate: add shorthand for deprecated calls
Module: xenomai-3 Branch: wip/dovetail Commit: e0b71cfaa084e8ea784cab2ab1425761f52a56fa URL: http://git.xenomai.org/?p=xenomai-3.git;a=commit;h=e0b71cfaa084e8ea784cab2ab1425761f52a56fa Author: Philippe Gerum Date: Fri Mar 18 13:01:38 2016 +0100 include/boilerplate: add shorthand for deprecated calls --- include/boilerplate/compiler.h |4 include/cobalt/stdio.h |3 +-- include/cobalt/wrappers.h |2 ++ include/trank/native/misc.h|4 ++-- include/trank/native/task.h|2 +- include/trank/native/timer.h |2 +- include/trank/trank.h |4 ++-- 7 files changed, 13 insertions(+), 8 deletions(-) diff --git a/include/boilerplate/compiler.h b/include/boilerplate/compiler.h index e27d165..e558f73 100644 --- a/include/boilerplate/compiler.h +++ b/include/boilerplate/compiler.h @@ -54,4 +54,8 @@ #define __aligned(__n) __attribute__((aligned (__n))) #endif +#ifndef __deprecated +#define __deprecated __attribute__((__deprecated__)) +#endif + #endif /* _BOILERPLATE_COMPILER_H */ diff --git a/include/cobalt/stdio.h b/include/cobalt/stdio.h index 0d97b83..81486d5 100644 --- a/include/cobalt/stdio.h +++ b/include/cobalt/stdio.h @@ -114,8 +114,7 @@ void rt_print_flush_buffers(void); void assert_nrt(void); -__attribute__((__deprecated__)) -void assert_nrt_fast(void); +__deprecated void assert_nrt_fast(void); #ifdef __cplusplus } diff --git a/include/cobalt/wrappers.h b/include/cobalt/wrappers.h index 975f7a3..7e061ca 100644 --- a/include/cobalt/wrappers.h +++ b/include/cobalt/wrappers.h @@ -18,6 +18,8 @@ #ifndef _COBALT_WRAPPERS_H #define _COBALT_WRAPPERS_H +#include + #define __stringify_1(x...)#x #define __stringify(x...) __stringify_1(x) diff --git a/include/trank/native/misc.h b/include/trank/native/misc.h index bf0ed17..ea242d2 100644 --- a/include/trank/native/misc.h +++ b/include/trank/native/misc.h @@ -32,7 +32,7 @@ typedef struct rt_ioregion { extern "C" { #endif -__attribute__((__deprecated__)) +__deprecated static inline int rt_io_get_region(RT_IOREGION *iorn, const char *name, uint64_t start, @@ -43,7 +43,7 @@ static inline int rt_io_get_region(RT_IOREGION *iorn, return -ENOSYS; } -__attribute__((__deprecated__)) +__deprecated int rt_io_put_region(RT_IOREGION *iorn) { trank_warning("service should be provided by a RTDM driver"); diff --git a/include/trank/native/task.h b/include/trank/native/task.h index 5c4d354..85c3cd4 100644 --- a/include/trank/native/task.h +++ b/include/trank/native/task.h @@ -35,7 +35,7 @@ extern "C" { #endif -__attribute__((__deprecated__)) +__deprecated static inline int rt_task_notify(RT_TASK *task, rt_sigset_t sigs) { trank_warning("in-kernel native API is gone, rebase over RTDM"); diff --git a/include/trank/native/timer.h b/include/trank/native/timer.h index 7ccba1c..9cb606d 100644 --- a/include/trank/native/timer.h +++ b/include/trank/native/timer.h @@ -28,7 +28,7 @@ extern "C" { #endif -__attribute__((__deprecated__)) +__deprecated static inline int rt_timer_set_mode(RTIME nstick) { #ifdef CONFIG_XENO_LORES_CLOCK_DISABLED diff --git a/include/trank/trank.h b/include/trank/trank.h index 693c015..2477d45 100644 --- a/include/trank/trank.h +++ b/include/trank/trank.h @@ -18,6 +18,8 @@ #ifndef _XENOMAI_TRANK_TRANK_H #define _XENOMAI_TRANK_TRANK_H +#include + #ifdef __XENO_COMPAT__ void warning(const char *fmt, ...); @@ -32,8 +34,6 @@ void warning(const char *fmt, ...); #else /* !__XENO_COMPAT__ */ -#include - #define __CURRENT(call)call #define COMPAT_DECL(T, P) ___ Xenomai-git mailing list Xenomai-git@xenomai.org https://xenomai.org/mailman/listinfo/xenomai-git
[Xenomai-git] Philippe Gerum : include/boilerplate: add shorthand for deprecated calls
Module: xenomai-3 Branch: wip/prioceil Commit: efd5d7448fc915fb5d6b839340ee1be963aac2da URL: http://git.xenomai.org/?p=xenomai-3.git;a=commit;h=efd5d7448fc915fb5d6b839340ee1be963aac2da Author: Philippe Gerum Date: Fri Mar 18 13:01:38 2016 +0100 include/boilerplate: add shorthand for deprecated calls --- include/boilerplate/compiler.h |4 include/cobalt/stdio.h |3 +-- include/cobalt/wrappers.h |2 ++ include/trank/native/misc.h|4 ++-- include/trank/native/task.h|2 +- include/trank/native/timer.h |2 +- include/trank/trank.h |4 ++-- 7 files changed, 13 insertions(+), 8 deletions(-) diff --git a/include/boilerplate/compiler.h b/include/boilerplate/compiler.h index e27d165..e558f73 100644 --- a/include/boilerplate/compiler.h +++ b/include/boilerplate/compiler.h @@ -54,4 +54,8 @@ #define __aligned(__n) __attribute__((aligned (__n))) #endif +#ifndef __deprecated +#define __deprecated __attribute__((__deprecated__)) +#endif + #endif /* _BOILERPLATE_COMPILER_H */ diff --git a/include/cobalt/stdio.h b/include/cobalt/stdio.h index 0d97b83..81486d5 100644 --- a/include/cobalt/stdio.h +++ b/include/cobalt/stdio.h @@ -114,8 +114,7 @@ void rt_print_flush_buffers(void); void assert_nrt(void); -__attribute__((__deprecated__)) -void assert_nrt_fast(void); +__deprecated void assert_nrt_fast(void); #ifdef __cplusplus } diff --git a/include/cobalt/wrappers.h b/include/cobalt/wrappers.h index 975f7a3..7e061ca 100644 --- a/include/cobalt/wrappers.h +++ b/include/cobalt/wrappers.h @@ -18,6 +18,8 @@ #ifndef _COBALT_WRAPPERS_H #define _COBALT_WRAPPERS_H +#include + #define __stringify_1(x...)#x #define __stringify(x...) __stringify_1(x) diff --git a/include/trank/native/misc.h b/include/trank/native/misc.h index bf0ed17..ea242d2 100644 --- a/include/trank/native/misc.h +++ b/include/trank/native/misc.h @@ -32,7 +32,7 @@ typedef struct rt_ioregion { extern "C" { #endif -__attribute__((__deprecated__)) +__deprecated static inline int rt_io_get_region(RT_IOREGION *iorn, const char *name, uint64_t start, @@ -43,7 +43,7 @@ static inline int rt_io_get_region(RT_IOREGION *iorn, return -ENOSYS; } -__attribute__((__deprecated__)) +__deprecated int rt_io_put_region(RT_IOREGION *iorn) { trank_warning("service should be provided by a RTDM driver"); diff --git a/include/trank/native/task.h b/include/trank/native/task.h index 5c4d354..85c3cd4 100644 --- a/include/trank/native/task.h +++ b/include/trank/native/task.h @@ -35,7 +35,7 @@ extern "C" { #endif -__attribute__((__deprecated__)) +__deprecated static inline int rt_task_notify(RT_TASK *task, rt_sigset_t sigs) { trank_warning("in-kernel native API is gone, rebase over RTDM"); diff --git a/include/trank/native/timer.h b/include/trank/native/timer.h index 7ccba1c..9cb606d 100644 --- a/include/trank/native/timer.h +++ b/include/trank/native/timer.h @@ -28,7 +28,7 @@ extern "C" { #endif -__attribute__((__deprecated__)) +__deprecated static inline int rt_timer_set_mode(RTIME nstick) { #ifdef CONFIG_XENO_LORES_CLOCK_DISABLED diff --git a/include/trank/trank.h b/include/trank/trank.h index 693c015..2477d45 100644 --- a/include/trank/trank.h +++ b/include/trank/trank.h @@ -18,6 +18,8 @@ #ifndef _XENOMAI_TRANK_TRANK_H #define _XENOMAI_TRANK_TRANK_H +#include + #ifdef __XENO_COMPAT__ void warning(const char *fmt, ...); @@ -32,8 +34,6 @@ void warning(const char *fmt, ...); #else /* !__XENO_COMPAT__ */ -#include - #define __CURRENT(call)call #define COMPAT_DECL(T, P) ___ Xenomai-git mailing list Xenomai-git@xenomai.org https://xenomai.org/mailman/listinfo/xenomai-git
[Xenomai-git] Philippe Gerum : include/boilerplate: add shorthand for deprecated calls
Module: xenomai-3 Branch: stable-3.0.x Commit: efd5d7448fc915fb5d6b839340ee1be963aac2da URL: http://git.xenomai.org/?p=xenomai-3.git;a=commit;h=efd5d7448fc915fb5d6b839340ee1be963aac2da Author: Philippe Gerum Date: Fri Mar 18 13:01:38 2016 +0100 include/boilerplate: add shorthand for deprecated calls --- include/boilerplate/compiler.h |4 include/cobalt/stdio.h |3 +-- include/cobalt/wrappers.h |2 ++ include/trank/native/misc.h|4 ++-- include/trank/native/task.h|2 +- include/trank/native/timer.h |2 +- include/trank/trank.h |4 ++-- 7 files changed, 13 insertions(+), 8 deletions(-) diff --git a/include/boilerplate/compiler.h b/include/boilerplate/compiler.h index e27d165..e558f73 100644 --- a/include/boilerplate/compiler.h +++ b/include/boilerplate/compiler.h @@ -54,4 +54,8 @@ #define __aligned(__n) __attribute__((aligned (__n))) #endif +#ifndef __deprecated +#define __deprecated __attribute__((__deprecated__)) +#endif + #endif /* _BOILERPLATE_COMPILER_H */ diff --git a/include/cobalt/stdio.h b/include/cobalt/stdio.h index 0d97b83..81486d5 100644 --- a/include/cobalt/stdio.h +++ b/include/cobalt/stdio.h @@ -114,8 +114,7 @@ void rt_print_flush_buffers(void); void assert_nrt(void); -__attribute__((__deprecated__)) -void assert_nrt_fast(void); +__deprecated void assert_nrt_fast(void); #ifdef __cplusplus } diff --git a/include/cobalt/wrappers.h b/include/cobalt/wrappers.h index 975f7a3..7e061ca 100644 --- a/include/cobalt/wrappers.h +++ b/include/cobalt/wrappers.h @@ -18,6 +18,8 @@ #ifndef _COBALT_WRAPPERS_H #define _COBALT_WRAPPERS_H +#include + #define __stringify_1(x...)#x #define __stringify(x...) __stringify_1(x) diff --git a/include/trank/native/misc.h b/include/trank/native/misc.h index bf0ed17..ea242d2 100644 --- a/include/trank/native/misc.h +++ b/include/trank/native/misc.h @@ -32,7 +32,7 @@ typedef struct rt_ioregion { extern "C" { #endif -__attribute__((__deprecated__)) +__deprecated static inline int rt_io_get_region(RT_IOREGION *iorn, const char *name, uint64_t start, @@ -43,7 +43,7 @@ static inline int rt_io_get_region(RT_IOREGION *iorn, return -ENOSYS; } -__attribute__((__deprecated__)) +__deprecated int rt_io_put_region(RT_IOREGION *iorn) { trank_warning("service should be provided by a RTDM driver"); diff --git a/include/trank/native/task.h b/include/trank/native/task.h index 5c4d354..85c3cd4 100644 --- a/include/trank/native/task.h +++ b/include/trank/native/task.h @@ -35,7 +35,7 @@ extern "C" { #endif -__attribute__((__deprecated__)) +__deprecated static inline int rt_task_notify(RT_TASK *task, rt_sigset_t sigs) { trank_warning("in-kernel native API is gone, rebase over RTDM"); diff --git a/include/trank/native/timer.h b/include/trank/native/timer.h index 7ccba1c..9cb606d 100644 --- a/include/trank/native/timer.h +++ b/include/trank/native/timer.h @@ -28,7 +28,7 @@ extern "C" { #endif -__attribute__((__deprecated__)) +__deprecated static inline int rt_timer_set_mode(RTIME nstick) { #ifdef CONFIG_XENO_LORES_CLOCK_DISABLED diff --git a/include/trank/trank.h b/include/trank/trank.h index 693c015..2477d45 100644 --- a/include/trank/trank.h +++ b/include/trank/trank.h @@ -18,6 +18,8 @@ #ifndef _XENOMAI_TRANK_TRANK_H #define _XENOMAI_TRANK_TRANK_H +#include + #ifdef __XENO_COMPAT__ void warning(const char *fmt, ...); @@ -32,8 +34,6 @@ void warning(const char *fmt, ...); #else /* !__XENO_COMPAT__ */ -#include - #define __CURRENT(call)call #define COMPAT_DECL(T, P) ___ Xenomai-git mailing list Xenomai-git@xenomai.org https://xenomai.org/mailman/listinfo/xenomai-git
[Xenomai-git] Philippe Gerum : include/boilerplate: add shorthand for deprecated calls
Module: xenomai-3 Branch: next Commit: e0b71cfaa084e8ea784cab2ab1425761f52a56fa URL: http://git.xenomai.org/?p=xenomai-3.git;a=commit;h=e0b71cfaa084e8ea784cab2ab1425761f52a56fa Author: Philippe Gerum Date: Fri Mar 18 13:01:38 2016 +0100 include/boilerplate: add shorthand for deprecated calls --- include/boilerplate/compiler.h |4 include/cobalt/stdio.h |3 +-- include/cobalt/wrappers.h |2 ++ include/trank/native/misc.h|4 ++-- include/trank/native/task.h|2 +- include/trank/native/timer.h |2 +- include/trank/trank.h |4 ++-- 7 files changed, 13 insertions(+), 8 deletions(-) diff --git a/include/boilerplate/compiler.h b/include/boilerplate/compiler.h index e27d165..e558f73 100644 --- a/include/boilerplate/compiler.h +++ b/include/boilerplate/compiler.h @@ -54,4 +54,8 @@ #define __aligned(__n) __attribute__((aligned (__n))) #endif +#ifndef __deprecated +#define __deprecated __attribute__((__deprecated__)) +#endif + #endif /* _BOILERPLATE_COMPILER_H */ diff --git a/include/cobalt/stdio.h b/include/cobalt/stdio.h index 0d97b83..81486d5 100644 --- a/include/cobalt/stdio.h +++ b/include/cobalt/stdio.h @@ -114,8 +114,7 @@ void rt_print_flush_buffers(void); void assert_nrt(void); -__attribute__((__deprecated__)) -void assert_nrt_fast(void); +__deprecated void assert_nrt_fast(void); #ifdef __cplusplus } diff --git a/include/cobalt/wrappers.h b/include/cobalt/wrappers.h index 975f7a3..7e061ca 100644 --- a/include/cobalt/wrappers.h +++ b/include/cobalt/wrappers.h @@ -18,6 +18,8 @@ #ifndef _COBALT_WRAPPERS_H #define _COBALT_WRAPPERS_H +#include + #define __stringify_1(x...)#x #define __stringify(x...) __stringify_1(x) diff --git a/include/trank/native/misc.h b/include/trank/native/misc.h index bf0ed17..ea242d2 100644 --- a/include/trank/native/misc.h +++ b/include/trank/native/misc.h @@ -32,7 +32,7 @@ typedef struct rt_ioregion { extern "C" { #endif -__attribute__((__deprecated__)) +__deprecated static inline int rt_io_get_region(RT_IOREGION *iorn, const char *name, uint64_t start, @@ -43,7 +43,7 @@ static inline int rt_io_get_region(RT_IOREGION *iorn, return -ENOSYS; } -__attribute__((__deprecated__)) +__deprecated int rt_io_put_region(RT_IOREGION *iorn) { trank_warning("service should be provided by a RTDM driver"); diff --git a/include/trank/native/task.h b/include/trank/native/task.h index 5c4d354..85c3cd4 100644 --- a/include/trank/native/task.h +++ b/include/trank/native/task.h @@ -35,7 +35,7 @@ extern "C" { #endif -__attribute__((__deprecated__)) +__deprecated static inline int rt_task_notify(RT_TASK *task, rt_sigset_t sigs) { trank_warning("in-kernel native API is gone, rebase over RTDM"); diff --git a/include/trank/native/timer.h b/include/trank/native/timer.h index 7ccba1c..9cb606d 100644 --- a/include/trank/native/timer.h +++ b/include/trank/native/timer.h @@ -28,7 +28,7 @@ extern "C" { #endif -__attribute__((__deprecated__)) +__deprecated static inline int rt_timer_set_mode(RTIME nstick) { #ifdef CONFIG_XENO_LORES_CLOCK_DISABLED diff --git a/include/trank/trank.h b/include/trank/trank.h index 693c015..2477d45 100644 --- a/include/trank/trank.h +++ b/include/trank/trank.h @@ -18,6 +18,8 @@ #ifndef _XENOMAI_TRANK_TRANK_H #define _XENOMAI_TRANK_TRANK_H +#include + #ifdef __XENO_COMPAT__ void warning(const char *fmt, ...); @@ -32,8 +34,6 @@ void warning(const char *fmt, ...); #else /* !__XENO_COMPAT__ */ -#include - #define __CURRENT(call)call #define COMPAT_DECL(T, P) ___ Xenomai-git mailing list Xenomai-git@xenomai.org https://xenomai.org/mailman/listinfo/xenomai-git