X-Git-Url: http://wien.tomnetworks.com/gitweb/?a=blobdiff_plain;f=mono%2Futils%2Fchecked-build.h;h=3dcbe286cca7ee4da0924ddf14f8e010e40607b7;hb=8e6f129087207e14b5bc411554229441a7b522e6;hp=1f4ca74112a498f7b4b35316c4ebffebd369eb73;hpb=60f85567e2d8918fed1c37dd4da3018026328980;p=mono.git diff --git a/mono/utils/checked-build.h b/mono/utils/checked-build.h index 1f4ca74112a..3dcbe286cca 100644 --- a/mono/utils/checked-build.h +++ b/mono/utils/checked-build.h @@ -12,6 +12,7 @@ #include #include +#include #include typedef enum { @@ -185,12 +186,18 @@ void assert_in_gc_critical_region (void); void check_metadata_store(void *from, void *to); void check_metadata_store_local(void *from, void *to); +#define CHECKED_METADATA_STORE(ptr, val) check_metadata_store ((ptr), (val)) +#define CHECKED_METADATA_STORE_LOCAL(ptr, val) check_metadata_store_local ((ptr), (val)) + #else #define CHECKED_METADATA_WRITE_PTR(ptr, val) do { (ptr) = (val); } while (0) #define CHECKED_METADATA_WRITE_PTR_LOCAL(ptr, val) do { (ptr) = (val); } while (0) #define CHECKED_METADATA_WRITE_PTR_ATOMIC(ptr, val) do { mono_atomic_store_release (&(ptr), (val)); } while (0) +#define CHECKED_METADATA_STORE(ptr, val) do { (ptr); (val); } while (0) +#define CHECKED_METADATA_STORE_LOCAL(ptr, val) do { (ptr); (val); } while (0) + #endif /* defined(ENABLE_CHECKED_BUILD_METADATA) */ #ifdef ENABLE_CHECKED_BUILD_THREAD @@ -201,7 +208,7 @@ void check_metadata_store_local(void *from, void *to); void checked_build_thread_transition(const char *transition, void *info, int from_state, int suspend_count, int next_state, int suspend_count_delta); -G_GNUC_NORETURN void mono_fatal_with_history(const char *msg, ...); +G_GNUC_NORETURN MONO_ATTR_FORMAT_PRINTF(1,2) void mono_fatal_with_history(const char *msg, ...); #else