diff options
| author | David Lamparter <equinox@opensourcerouting.org> | 2016-11-08 18:11:20 +0100 |
|---|---|---|
| committer | David Lamparter <equinox@diac24.net> | 2019-04-27 19:33:39 +0200 |
| commit | bcea0c0fde0ae5f69aae7bd9d20f643075a14d06 (patch) | |
| tree | 77edb292b04c620bb3249dfb720598d7572ea8bb /lib/compiler.h | |
| parent | 80911bc26a44fd29eb311edbba7eb926d4eee1b8 (diff) | |
lib: atomlist & atomsort
These two are lock-free linked list implementations, the plain one is
primarily intended for queues while the sorted one is for general data
storage.
Signed-off-by: David Lamparter <equinox@diac24.net>
Diffstat (limited to 'lib/compiler.h')
| -rw-r--r-- | lib/compiler.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/compiler.h b/lib/compiler.h index 02bdbd6afd..474adc7c8b 100644 --- a/lib/compiler.h +++ b/lib/compiler.h @@ -32,6 +32,7 @@ extern "C" { # define _FALLTHROUGH __attribute__((fallthrough)); #endif # define _CONSTRUCTOR(x) constructor(x) +# define _DEPRECATED(x) deprecated(x) #elif defined(__GNUC__) #if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 9) # define _RET_NONNULL , returns_nonnull @@ -41,6 +42,9 @@ extern "C" { # define _DESTRUCTOR(x) destructor(x) # define _ALLOC_SIZE(x) alloc_size(x) #endif +#if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 5) +# define _DEPRECATED(x) deprecated(x) +#endif #if __GNUC__ >= 7 # define _FALLTHROUGH __attribute__((fallthrough)); #endif @@ -68,6 +72,9 @@ extern "C" { #ifndef _FALLTHROUGH #define _FALLTHROUGH #endif +#ifndef _DEPRECATED +#define _DEPRECATED(x) deprecated +#endif /* for helper functions defined inside macros */ #define macro_inline static inline __attribute__((unused)) |
