X-Git-Url: https://git.kernel.dk/?p=fio.git;a=blobdiff_plain;f=compiler%2Fcompiler.h;h=0a0213b60fca5204cb9d0294ffb01139baa23083;hp=8923f9a6235190d0837505c1852363fdf3fd6162;hb=ae5888523480f094ce04375a45797e111273ab22;hpb=24d23ca76f9be4500270e7074a1dab038e3a4a2b diff --git a/compiler/compiler.h b/compiler/compiler.h index 8923f9a6..0a0213b6 100644 --- a/compiler/compiler.h +++ b/compiler/compiler.h @@ -13,12 +13,13 @@ #define __must_check #endif -#ifndef _weak -#ifndef __CYGWIN__ -#define _weak __attribute__((weak)) -#else -#define _weak -#endif -#endif +/* + * Mark unused variables passed to ops functions as unused, to silence gcc + */ +#define fio_unused __attribute__((__unused__)) +#define fio_init __attribute__((constructor)) +#define fio_exit __attribute__((destructor)) + +#define fio_unlikely(x) __builtin_expect(!!(x), 0) #endif