libyggdrasil  v1.0.0
attributes.hpp
Go to the documentation of this file.
1  /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
2  * _____.___. .___ .__.__ *
3  * \__ | | ____ ____ __| _/___________ _____|__| | *
4  * / | |/ ___\ / ___\ / __ |\_ __ \__ \ / ___/ | | *
5  * \____ / /_/ > /_/ > /_/ | | | \// __ \_\___ \| | |__ *
6  * / ______\___ /\___ /\____ | |__| (____ /____ >__|____/ *
7  * \/ /_____//_____/ \/ \/ \/ *
8  * - Common - *
9  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
10  * This software can be used by students and other personal of the *
11  * Bern University of Applied Sciences under the terms of the MIT *
12  * license. *
13  * For other persons this software is under the terms of the GNU *
14  * General Public License version 2. *
15  * *
16  * Copyright © 2021, Bern University of Applied Sciences. *
17  * All rights reserved. *
18  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
26 #pragma once
27 
28 #define FALLTRHOUGH [[fallthrough]]
29 #define LIKELY [[likely]]
30 #define UNLIKELY [[unlikely]]
31 #define DEPRECTATED(reason) [[deprecated(reason)]]
32 #define NO_RETURN [[noreturn]]
33 
34 #define WEAK [[gnu::weak]]
35 #define ALWAYS_INLINE [[gnu::always_inline]] inline
36 #define PACKED [[gnu::packed]]
37 #define NAKED [[gnu::naked]]
38 #define SECTION(name) [[gnu::section(name)]]
39 #define ALIGNED(alignment) [[gnu::aligned(alignment)]]
40 
41 #define C_LINKAGE extern "C"