-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathattribute.h
More file actions
61 lines (51 loc) · 1.8 KB
/
attribute.h
File metadata and controls
61 lines (51 loc) · 1.8 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
/******************************************
* File Name : attribute.h
* Creation Date : 22-09-2018
* Last Modified :
* Created By : Mihai Constantin [email protected]
* License :
******************************************/
/**
* Purpose
*/
#ifndef _PRETTY_ATTRIBUTE_H_
#define _PRETTY_ATTRIBUTE_H_
/**
* ******************************************************
* @brief
* ******************************************************
**/
#if __GNUC_ _ >= 3
# undef inline
# define inline inline __attribute_ _ ((always_inline))
# define __noinline __attribute__ ((noinline))
# define __pure __attribute__ ((pure))
# define __const __attribute__ ((const))
# define __noreturn __attribute__ ((noreturn))
# define __malloc __attribute__ ((malloc))
# define __must_check __attribute__ ((warn_unused_result))
# define __deprecated __attribute__ ((deprecated))
# define __used __attribute__ ((used))
# define __unused __attribute__ ((unused))
# define __packed __attribute__ ((packed))
# define __align(x) __attribute__ ((aligned (x)))
# define __align_max __attribute__ ((aligned))
# define likely(x) __builtin_expect (!!(x), 1)
# define unlikely(x) __builtin_expect (!!(x), 0)
#else
# define __noinline /* no noinline */
# define __pure /* no pure */
# define __const /* no const */
# define __noreturn /* no noreturn */
# define __malloc /* no malloc */
# define __must_check /* no warn_unused_result */
# define __deprecated /* no deprecated */
# define __used /* no used */
# define __unused /* no unused */
# define __packed /* no packed */
# define __align(x) /* no aligned */
# define __align_max /* no align_max */
# define likely(x) (x)
# define unlikely(x) (x)
#endif
#endif