18 #ifndef _COBALT_WRAPPERS_H
19 #define _COBALT_WRAPPERS_H
21 #include <boilerplate/compiler.h>
23 #define __stringify_1(x...) #x
24 #define __stringify(x...) __stringify_1(x)
26 #define __WRAP(call) __wrap_ ## call
27 #define __STD(call) __real_ ## call
28 #define __COBALT(call) __cobalt_ ## call
29 #define __RT(call) __COBALT(call)
30 #define COBALT_DECL(T, P) \
31 __typeof__(T) __RT(P); \
32 __typeof__(T) __STD(P); \
33 __typeof__(T) __WRAP(P)
51 #define COBALT_IMPL(T, I, A) \
52 __typeof__(T) __wrap_ ## I A __attribute__((alias("__cobalt_" __stringify(I)), weak)); \
53 __typeof__(T) __cobalt_ ## I A