Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaolo Molaro <lupus@oddwiz.org>2006-02-09 18:22:31 +0300
committerPaolo Molaro <lupus@oddwiz.org>2006-02-09 18:22:31 +0300
commitea6ba824965cb2b714030ca9072cc226cdfbe1c1 (patch)
tree15c15227d62654fe177a83a3b688ce0cc7fbf7f6 /libgc/darwin_stop_world.c
parenta60c6407fbeba77766e0daa1f1f62a6c12b96f05 (diff)
Thu Feb 9 16:20:55 CET 2006 Paolo Molaro <lupus@ximian.com>
* os_dep.c, include/private/gcconfig.h, darwin_stop_world.c: OSX/x86 support, mostly from Geoff Norton <gnorton@customerdna.com>. svn path=/trunk/mono/; revision=56707
Diffstat (limited to 'libgc/darwin_stop_world.c')
-rw-r--r--libgc/darwin_stop_world.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/libgc/darwin_stop_world.c b/libgc/darwin_stop_world.c
index 692b18db4db..53604450328 100644
--- a/libgc/darwin_stop_world.c
+++ b/libgc/darwin_stop_world.c
@@ -73,7 +73,13 @@ void GC_push_all_stacks() {
GC_thread p;
pthread_t me;
ptr_t lo, hi;
+#if defined(POWERPC)
ppc_thread_state_t state;
+#elif defined(I386)
+ i386_thread_state_t state;
+#else
+# error FIXME for non-x86 || ppc architectures
+#endif
mach_msg_type_number_t thread_state_count = MACHINE_THREAD_STATE_COUNT;
me = pthread_self();
@@ -93,6 +99,17 @@ void GC_push_all_stacks() {
&thread_state_count);
if(r != KERN_SUCCESS) ABORT("thread_get_state failed");
+#if defined(I386)
+ lo = state.esp;
+
+ GC_push_one(state.eax);
+ GC_push_one(state.ebx);
+ GC_push_one(state.ecx);
+ GC_push_one(state.edx);
+ GC_push_one(state.edi);
+ GC_push_one(state.esi);
+ GC_push_one(state.ebp);
+#elif defined(POWERPC)
lo = (void*)(state.r1 - PPC_RED_ZONE_SIZE);
GC_push_one(state.r0);
@@ -126,6 +143,9 @@ void GC_push_all_stacks() {
GC_push_one(state.r29);
GC_push_one(state.r30);
GC_push_one(state.r31);
+#else
+# error FIXME for non-x86 || ppc architectures
+#endif
} /* p != me */
if(p->flags & MAIN_THREAD)
hi = GC_stackbottom;