X-Git-Url: http://wien.tomnetworks.com/gitweb/?a=blobdiff_plain;f=mono%2Fmetadata%2Fsgen-client-mono.h;h=2c0445c4a11dbb6eecd050a7e699b0d99af4233e;hb=1a45c48351324ea82606c5eea72b5d195ca3a7b4;hp=e986ae0c2ed5ba451d3c3b34204e27ae687405fa;hpb=226af94a2345f88d3170823646e1c25a276ba281;p=mono.git diff --git a/mono/metadata/sgen-client-mono.h b/mono/metadata/sgen-client-mono.h index e986ae0c2ed..2c0445c4a11 100644 --- a/mono/metadata/sgen-client-mono.h +++ b/mono/metadata/sgen-client-mono.h @@ -88,10 +88,10 @@ struct _SgenClientThreadInfo { #include "metadata/profiler-private.h" #include "utils/dtrace.h" #include "utils/mono-counters.h" -#include "utils/mono-logger-internal.h" +#include "utils/mono-logger-internals.h" #include "utils/mono-time.h" -#include "utils/mono-semaphore.h" -#include "metadata/sgen-bridge-internal.h" +#include "utils/mono-os-semaphore.h" +#include "metadata/sgen-bridge-internals.h" extern void mono_sgen_register_moved_object (void *obj, void *destination); extern void mono_sgen_gc_event_moves (void); @@ -114,7 +114,7 @@ sgen_mono_array_size (GCVTable vtable, MonoArray *array, mword *bounds_size, mwo else element_size = vtable->klass->sizes.element_size; - size_without_bounds = size = sizeof (MonoArray) + element_size * mono_array_length_fast (array); + size_without_bounds = size = MONO_SIZEOF_MONO_ARRAY + element_size * mono_array_length_fast (array); if (G_UNLIKELY (array->bounds)) { size += sizeof (mono_array_size_t) - 1; @@ -244,14 +244,14 @@ extern gboolean sgen_mono_xdomain_checks; static gboolean G_GNUC_UNUSED sgen_client_object_has_critical_finalizer (GCObject *obj) { - MonoClass *class; + MonoClass *klass; if (!mono_defaults.critical_finalizer_object) return FALSE; - class = SGEN_LOAD_VTABLE (obj)->klass; + klass = SGEN_LOAD_VTABLE (obj)->klass; - return mono_class_has_parent_fast (class, mono_defaults.critical_finalizer_object); + return mono_class_has_parent_fast (klass, mono_defaults.critical_finalizer_object); } const char* sgen_client_vtable_get_namespace (GCVTable vtable); @@ -401,7 +401,7 @@ sgen_client_binary_protocol_block_free (gpointer addr, size_t size) } static void G_GNUC_UNUSED -sgen_client_binary_protocol_block_set_state (gpointer addr, size_t size, int old, int new) +sgen_client_binary_protocol_block_set_state (gpointer addr, size_t size, int old, int new_) { } @@ -560,6 +560,11 @@ sgen_client_binary_protocol_global_remset (gpointer ptr, gpointer value, gpointe #endif } +static void G_GNUC_UNUSED +sgen_client_binary_protocol_mod_union_remset (gpointer obj, gpointer ptr, gpointer value, gpointer value_vtable) +{ +} + static void G_GNUC_UNUSED sgen_client_binary_protocol_ptr_update (gpointer ptr, gpointer old_value, gpointer new_value, gpointer vtable, size_t size) { @@ -670,8 +675,6 @@ extern MonoNativeTlsKey thread_info_key; #define IN_CRITICAL_REGION (__thread_info__->client_info.in_critical_region) #endif -#ifndef DISABLE_CRITICAL_REGION - #ifdef HAVE_KW_THREAD #define IN_CRITICAL_REGION sgen_thread_info->client_info.in_critical_region #else @@ -686,17 +689,15 @@ extern MonoNativeTlsKey thread_info_key; */ #define EXIT_CRITICAL_REGION do { mono_atomic_store_release (&IN_CRITICAL_REGION, 0); } while (0) -#endif - #define SGEN_TV_DECLARE(name) gint64 name #define SGEN_TV_GETTIME(tv) tv = mono_100ns_ticks () #define SGEN_TV_ELAPSED(start,end) ((long)(end-start)) typedef MonoSemType SgenSemaphore; -#define SGEN_SEMAPHORE_INIT(sem,initial) MONO_SEM_INIT ((sem), (initial)) -#define SGEN_SEMAPHORE_POST(sem) MONO_SEM_POST ((sem)) -#define SGEN_SEMAPHORE_WAIT(sem) MONO_SEM_WAIT ((sem)) +#define SGEN_SEMAPHORE_INIT(sem,initial) mono_os_sem_init ((sem), (initial)) +#define SGEN_SEMAPHORE_POST(sem) mono_os_sem_post ((sem)) +#define SGEN_SEMAPHORE_WAIT(sem) mono_os_sem_wait ((sem), MONO_SEM_FLAGS_NONE) gboolean sgen_has_critical_method (void); gboolean sgen_is_critical_method (MonoMethod *method);