X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fruntime%2Fgc-internal.h;h=f04bf6e38b1e494877878da5a42208f3a202552f;hb=1363121ddb1d2e722e2e41d1c93758551066797c;hp=d85a7836d9f7eea71dd92568896a2a68fff35a8a;hpb=79cc569a97e444389350ea3f5b1017374fe16bec;p=sbcl.git diff --git a/src/runtime/gc-internal.h b/src/runtime/gc-internal.h index d85a783..f04bf6e 100644 --- a/src/runtime/gc-internal.h +++ b/src/runtime/gc-internal.h @@ -19,14 +19,24 @@ /* disabling gc assertions made no discernable difference to GC speed, * last I tried it - dan 2003.12.21 */ #if 1 -#define gc_assert(ex) do { \ - if (!(ex)) gc_abort(); \ +# define gc_assert(ex) \ +do { \ + if (!(ex)) gc_abort(); \ +} while (0) +# define gc_assert_verbose(ex, fmt, ...) \ +do { \ + if (!(ex)) { \ + fprintf(stderr, fmt, ## __VA_ARGS__); \ + gc_abort(); \ + } \ } while (0) #else -#define gc_assert(ex) +# define gc_assert(ex) +# define gc_assert_verbose(ex, fmt, ...) #endif -#define gc_abort() lose("GC invariant lost, file \"%s\", line %d", \ - __FILE__, __LINE__) + +#define gc_abort() \ + lose("GC invariant lost, file \"%s\", line %d\n", __FILE__, __LINE__) #define CEILING(x,y) (((x) + ((y) - 1)) & (~((y) - 1)))