xref: /openbmc/qemu/tests/tcg/cris/libc/sys.h (revision f0984d40)
1 #include <unistd.h>
2 
3 #define STRINGIFY(x) #x
4 #define TOSTRING(x) STRINGIFY(x)
5 
6 #define always_inline inline __attribute__((always_inline))
7 
8 #define CURRENT_LOCATION __FILE__ ":" TOSTRING(__LINE__)
9 
10 #define err()                         \
11 {                                     \
12   _fail("at " CURRENT_LOCATION " ");  \
13 }
14 
15 #define mb() asm volatile ("" : : : "memory")
16 
17 void pass(void);
18 void _fail(char *reason);
19