-/*
- * sgen-client-mono.h: Mono's client definitions for SGen.
+/**
+ * \file
+ * Mono's client definitions for SGen.
*
* Copyright (C) 2014 Xamarin Inc
*
gboolean skip, suspend_done;
volatile int in_critical_region;
- gpointer stopped_ip; /* only valid if the thread is stopped */
- MonoDomain *stopped_domain; /* dsto */
-
/*
This is set the argument of mono_gc_set_skip_thread.
#define SGEN_CLIENT_OBJECT_HEADER_SIZE (sizeof (GCObject))
#define SGEN_CLIENT_MINIMUM_OBJECT_SIZE SGEN_CLIENT_OBJECT_HEADER_SIZE
-static mword /*__attribute__((noinline)) not sure if this hint is a good idea*/
+static mword /*__attribute__ ((__noinline__)) not sure if this hint is a good idea*/
sgen_client_slow_object_get_size (GCVTable vtable, GCObject* o)
{
MonoClass *klass = ((MonoVTable*)vtable)->klass;
sgen_client_binary_protocol_world_stopping (int generation, long long timestamp, gpointer thread)
{
MONO_GC_WORLD_STOP_BEGIN ();
-
- mono_profiler_gc_event (MONO_GC_EVENT_PRE_STOP_WORLD, generation);
}
static void G_GNUC_UNUSED
sgen_client_binary_protocol_world_stopped (int generation, long long timestamp, long long total_major_cards, long long marked_major_cards, long long total_los_cards, long long marked_los_cards)
{
MONO_GC_WORLD_STOP_END ();
-
- mono_profiler_gc_event (MONO_GC_EVENT_POST_STOP_WORLD, generation);
}
static void G_GNUC_UNUSED
sgen_client_binary_protocol_world_restarting (int generation, long long timestamp, long long total_major_cards, long long marked_major_cards, long long total_los_cards, long long marked_los_cards)
{
MONO_GC_WORLD_RESTART_BEGIN (generation);
-
- mono_profiler_gc_event (MONO_GC_EVENT_PRE_START_WORLD, generation);
}
static void G_GNUC_UNUSED
sgen_client_binary_protocol_world_restarted (int generation, long long timestamp)
{
MONO_GC_WORLD_RESTART_END (generation);
-
- mono_profiler_gc_event (MONO_GC_EVENT_POST_START_WORLD, generation);
}
static void G_GNUC_UNUSED
{
}
-int sgen_thread_handshake (BOOL suspend);
-gboolean sgen_suspend_thread (SgenThreadInfo *info);
-gboolean sgen_resume_thread (SgenThreadInfo *info);
-void sgen_wait_for_suspend_ack (int count);
-
-#ifdef HAVE_KW_THREAD
-extern __thread SgenThreadInfo *sgen_thread_info;
-#define TLAB_ACCESS_INIT
-#define IN_CRITICAL_REGION sgen_thread_info->client_info.in_critical_region
-#else
-extern MonoNativeTlsKey thread_info_key;
-#define TLAB_ACCESS_INIT SgenThreadInfo *__thread_info__ = mono_native_tls_get_value (thread_info_key)
-#define IN_CRITICAL_REGION (__thread_info__->client_info.in_critical_region)
-#endif
-
-#ifdef HAVE_KW_THREAD
-#define IN_CRITICAL_REGION sgen_thread_info->client_info.in_critical_region
-#else
+#define TLAB_ACCESS_INIT SgenThreadInfo *__thread_info__ = (SgenThreadInfo*)mono_tls_get_sgen_thread_info ()
#define IN_CRITICAL_REGION (__thread_info__->client_info.in_critical_region)
-#endif
/* Enter must be visible before anything is done in the critical region. */
#define ENTER_CRITICAL_REGION do { mono_atomic_store_acquire (&IN_CRITICAL_REGION, 1); } while (0)