[sgen] Jobs for scanning from registered roots.
[mono.git] / mono / io-layer / critical-sections.h
index a53ab288e3ff258a095a6b7fcadee6f0e65bb7f8..6926e7687c7c518a0dfd5df9570a6b8a90bfa90c 100644 (file)
@@ -35,11 +35,15 @@ extern gboolean TryEnterCriticalSection(WapiCriticalSection *section);
 
 #define EnterCriticalSection(section) do { \
        int ret = mono_mutex_lock(&(section)->mutex);    \
-    g_assert (ret == 0);    \
+       if (ret != 0) \
+               g_warning ("Bad call to mono_mutex_lock result %d", ret); \
+       g_assert (ret == 0);                             \
 } while (0)
 
 #define LeaveCriticalSection(section) do { \
        int ret = mono_mutex_unlock(&(section)->mutex);      \
+       if (ret != 0) \
+               g_warning ("Bad call to mono_mutex_unlock result %d", ret); \
        g_assert (ret == 0);    \
 } while (0)