X-Git-Url: https://wimlib.net/git/?a=blobdiff_plain;f=include%2Fwimlib%2Fcompiler.h;h=c6e22e98d649d5cb42937eabdaf52472fb8af408;hb=b79d426cd90c506974f6c956a9af141b5d257d42;hp=d32d092b964dfda938aa82cd4343edb085e9e103;hpb=047d0a95f3968037834af5dff0d79c1192626025;p=wimlib diff --git a/include/wimlib/compiler.h b/include/wimlib/compiler.h index d32d092b..c6e22e98 100644 --- a/include/wimlib/compiler.h +++ b/include/wimlib/compiler.h @@ -1,3 +1,10 @@ +/* + * compiler.h + * + * The author dedicates this file to the public domain. + * You can do whatever you want with this file. + */ + #ifndef _WIMLIB_COMPILER_H #define _WIMLIB_COMPILER_H @@ -22,6 +29,7 @@ # define likely(x) __builtin_expect(!!(x), 1) # define unlikely(x) __builtin_expect(!!(x), 0) # define inline inline __attribute__((always_inline)) +# define prefetch(x) __builtin_prefetch(x) #else # define WIMLIBAPI # define _always_inline_attribute inline @@ -33,6 +41,7 @@ # define _aligned_attribute(size) # define likely(x) (x) # define unlikely(x) (x) +# define prefetch(x) #endif /* __GNUC__ */ #endif /* _WIMLIB_COMPILER_H */