#include <glib.h>
-#include "metadata/sgen-gc.h"
-#include "metadata/sgen-archdep.h"
-#include "metadata/sgen-protocol.h"
-#include "metadata/sgen-thread-pool.h"
+#include "sgen/sgen-gc.h"
+#include "sgen/sgen-archdep.h"
+#include "sgen/sgen-protocol.h"
+#include "sgen/sgen-thread-pool.h"
#include "metadata/object-internals.h"
#include "metadata/gc-internal.h"
#endif
#if defined(__MACH__) && MONO_MACH_ARCH_SUPPORTED
+
+#if !defined(USE_COOP_GC)
gboolean
sgen_resume_thread (SgenThreadInfo *info)
{
info->client_info.stopped_domain = mono_thread_info_tls_get (info, TLS_KEY_DOMAIN);
info->client_info.stopped_ip = (gpointer) mono_mach_arch_get_ip (state);
- info->stack_start = NULL;
+ info->client_info.stack_start = NULL;
stack_start = (char*) mono_mach_arch_get_sp (state) - REDZONE_SIZE;
/* If stack_start is not within the limits, then don't set it in info and we will be restarted. */
- if (stack_start >= info->stack_start_limit && stack_start <= info->stack_end) {
- info->stack_start = stack_start;
+ if (stack_start >= info->client_info.stack_start_limit && stack_start <= info->client_info.stack_end) {
+ info->client_info.stack_start = stack_start;
#ifdef USE_MONO_CTX
- mono_sigctx_to_monoctx (&ctx, &info->ctx);
+ mono_sigctx_to_monoctx (&ctx, &info->client_info.ctx);
#else
- ARCH_COPY_SIGCTX_REGS (&info->regs, &ctx);
+ ARCH_COPY_SIGCTX_REGS (&info->client_info.regs, &ctx);
#endif
} else {
- g_assert (!info->stack_start);
+ g_assert (!info->client_info.stack_start);
}
/* Notify the JIT */
if (mono_gc_get_gc_callbacks ()->thread_suspend_func)
- mono_gc_get_gc_callbacks ()->thread_suspend_func (info->runtime_data, &ctx, NULL);
+ mono_gc_get_gc_callbacks ()->thread_suspend_func (info->client_info.runtime_data, &ctx, NULL);
- SGEN_LOG (2, "thread %p stopped at %p stack_start=%p", (void*)(gsize)info->client_info.info.native_handle, info->client_info.stopped_ip, info->stack_start);
+ SGEN_LOG (2, "thread %p stopped at %p stack_start=%p", (void*)(gsize)info->client_info.info.native_handle, info->client_info.stopped_ip, info->client_info.stack_start);
binary_protocol_thread_suspend ((gpointer)mono_thread_info_get_tid (info), info->client_info.stopped_ip);
return TRUE;
continue;
info->client_info.suspend_done = FALSE;
- if (info->gc_disabled)
+ if (info->client_info.gc_disabled)
continue;
if (suspend) {
}
#endif
#endif
+#endif