Loading...
Searching...
No Matches
18#ifndef _COBALT_WRAPPERS_H
19#define _COBALT_WRAPPERS_H
21#include <boilerplate/compiler.h>
23#define __WRAP(call) __wrap_ ## call
24#define __STD(call) __real_ ## call
25#define __COBALT(call) __cobalt_ ## call
26#define __RT(call) __COBALT(call)
27#define COBALT_DECL(T, FN, I) \
28 __typeof__(T) __RT(FN) I; \
29 __typeof__(T) __STD(FN) I; \
30 __typeof__(T) __WRAP(FN) I
32#if __USE_TIME_BITS64 && __TIMESIZE == 32
36#define COBALT_IMPL_TIME64(T, FN, FN_64, I) \
37 __typeof__(T) __wrap_##FN_64 I \
38 __attribute__((alias("__cobalt_" __stringify(FN)), weak)); \
40#define COBALT_DECL_TIME64(T, FN, A, I) \
41 __typeof__(T) __STD(A) I; \
42 extern T __REDIRECT_NTH(__STD(FN), I, __real_##A); \
45#define COBALT_IMPL_TIME64(T, FN, FN_64, I) COBALT_IMPL(T, FN, I)
46#define COBALT_DECL_TIME64(T, FN, FN_64, I) COBALT_DECL(T, FN, I)
65#define COBALT_IMPL(T, FN, I) \
66 __typeof__(T) __wrap_##FN I \
67 __attribute__((alias("__cobalt_" __stringify(FN)), weak)); \
68 __typeof__(T) __cobalt_##FN I