[mini] Add my test suite to the list of magic type assemblies.
[mono.git] / mono / metadata / sgen-mono.c
index 7f2a233401d7da565051c04dbd08f7faf851c95d..4cd30493fff80524e3b60b368623d7e2d35563c7 100644 (file)
@@ -2803,7 +2803,7 @@ void
 sgen_client_gchandle_created (int handle_type, GCObject *obj, guint32 handle)
 {
 #ifndef DISABLE_PERFCOUNTERS
-       mono_perfcounters->gc_num_handles++;
+       InterlockedIncrement (&mono_perfcounters->gc_num_handles);
 #endif
 
        MONO_PROFILER_RAISE (gc_handle_created, (handle, handle_type, obj));
@@ -2813,7 +2813,7 @@ void
 sgen_client_gchandle_destroyed (int handle_type, guint32 handle)
 {
 #ifndef DISABLE_PERFCOUNTERS
-       mono_perfcounters->gc_num_handles--;
+       InterlockedDecrement (&mono_perfcounters->gc_num_handles);
 #endif
 
        MONO_PROFILER_RAISE (gc_handle_deleted, (handle, handle_type));