X-Git-Url: http://wien.tomnetworks.com/gitweb/?a=blobdiff_plain;f=mono%2Fio-layer%2Fcritical-sections.h;h=aa7bad248be58a1c2d255d99a110cf80c4595370;hb=9932336e7b298c2b411aa9ac0d9ab28cc0d049bd;hp=a53ab288e3ff258a095a6b7fcadee6f0e65bb7f8;hpb=881f83658281916d8f0784df7c726ecb7cc289db;p=mono.git diff --git a/mono/io-layer/critical-sections.h b/mono/io-layer/critical-sections.h index a53ab288e3f..aa7bad248be 100644 --- a/mono/io-layer/critical-sections.h +++ b/mono/io-layer/critical-sections.h @@ -13,7 +13,7 @@ #include #include -#include "mono-mutex.h" +#include G_BEGIN_DECLS @@ -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)