[sgen] Fix locking of the worker distribute gray queue.
[mono.git] / mono / metadata / object-internals.h
index d83c59afe16bbff3cd9001356cbf9e136491ff4c..e59a4d4eb9c1fa0f3f34b670cc58009f646b86e3 100644 (file)
@@ -83,7 +83,7 @@
 #endif
 
 #define MONO_CHECK_ARG(arg, expr)              G_STMT_START{             \
-     if (!(expr))                                                        \
+               if (G_UNLIKELY (!(expr)))                                                         \
        {                                                                 \
                MonoException *ex;                                        \
                char *msg = g_strdup_printf ("assertion `%s' failed",     \
@@ -95,7 +95,7 @@
        };                              }G_STMT_END
 
 #define MONO_CHECK_ARG_NULL(arg)           G_STMT_START{                 \
-     if (arg == NULL)                                                    \
+               if (G_UNLIKELY (arg == NULL))                                             \
        {                                                                 \
                MonoException *ex;                                        \
                if (arg) {} /* check if the name exists */                \