X-Git-Url: http://wien.tomnetworks.com/gitweb/?a=blobdiff_plain;f=mono%2Fmetadata%2Fsgen-client-mono.h;h=cb60f3b58ec2b86b58701a4fb1e194a177135c2e;hb=aefc06ddf682848e3a6a4e0a534f443b335a6167;hp=02cfce160ca364ad25a6c909523cbd2785408a42;hpb=7c4fb8caf0fb90251ec20cf135a3eba293090ee2;p=mono.git diff --git a/mono/metadata/sgen-client-mono.h b/mono/metadata/sgen-client-mono.h index 02cfce160ca..cb60f3b58ec 100644 --- a/mono/metadata/sgen-client-mono.h +++ b/mono/metadata/sgen-client-mono.h @@ -39,9 +39,6 @@ struct _SgenClientThreadInfo { 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. @@ -84,6 +81,7 @@ extern void mono_sgen_init_stw (void); enum { INTERNAL_MEM_EPHEMERON_LINK = INTERNAL_MEM_FIRST_CLIENT, + INTERNAL_MEM_MOVED_OBJECT, INTERNAL_MEM_MAX }; @@ -694,10 +692,10 @@ sgen_client_binary_protocol_header (long long check, int version, int ptr_size, { } -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); +static void G_GNUC_UNUSED +sgen_client_binary_protocol_pin_stats (int objects_pinned_in_nursery, size_t bytes_pinned_in_nursery, int objects_pinned_in_major, size_t bytes_pinned_in_major) +{ +} #ifdef HAVE_KW_THREAD extern __thread SgenThreadInfo *sgen_thread_info; @@ -723,10 +721,23 @@ extern MonoNativeTlsKey thread_info_key; */ #define EXIT_CRITICAL_REGION do { mono_atomic_store_release (&IN_CRITICAL_REGION, 0); } while (0) +#ifndef DISABLE_CRITICAL_REGION +/* + * We can only use a critical region in the managed allocator if the JIT supports OP_ATOMIC_STORE_I4. + * + * TODO: Query the JIT instead of this ifdef hack. + */ +#if defined (TARGET_X86) || defined (TARGET_AMD64) || (defined (TARGET_ARM) && defined (HAVE_ARMV7)) || defined (TARGET_ARM64) +#define MANAGED_ALLOCATOR_CAN_USE_CRITICAL_REGION +#endif +#endif + #define SGEN_TV_DECLARE(name) gint64 name #define SGEN_TV_GETTIME(tv) tv = mono_100ns_ticks () #define SGEN_TV_ELAPSED(start,end) ((gint64)(end-start)) +guint64 mono_time_since_last_stw (void); + typedef MonoSemType SgenSemaphore; #define SGEN_SEMAPHORE_INIT(sem,initial) mono_os_sem_init ((sem), (initial))