Author: ranger Date: Thu Dec 13 18:23:15 2007 New Revision: 1087 URL: http://svn.finkproject.org/websvn/listing.php?sc=1&rev=1087&repname=user%3a+ranger Log: more mono cleanups
Modified: trunk/experimental/common/crypto/finkinfo/gecko-sharp-2.0.info trunk/experimental/common/crypto/finkinfo/gecko-sharp.info trunk/experimental/common/crypto/finkinfo/gecko-sharp1-0.6.info trunk/experimental/common/crypto/finkinfo/gecko-sharp1.info trunk/experimental/common/crypto/finkinfo/gtk-sharp-monodoc.info trunk/experimental/common/crypto/finkinfo/gtksourceview-sharp.info trunk/experimental/common/crypto/finkinfo/mono-tools.info trunk/experimental/common/crypto/finkinfo/monodevelop.info trunk/experimental/common/main/finkinfo/devel/nant.info trunk/experimental/common/main/finkinfo/languages/mono.info trunk/experimental/common/main/finkinfo/languages/mono.patch trunk/experimental/common/main/finkinfo/libs/cocoa-sharp.info trunk/experimental/common/main/finkinfo/libs/dbus-sharp.info trunk/experimental/copy-mono.sh Modified: trunk/experimental/common/crypto/finkinfo/gecko-sharp-2.0.info URL: http://svn.finkproject.org/websvn/diff.php?path=/trunk/experimental/common/crypto/finkinfo/gecko-sharp-2.0.info&rev=1087&repname=user%3a+ranger ============================================================================== --- trunk/experimental/common/crypto/finkinfo/gecko-sharp-2.0.info (original) +++ trunk/experimental/common/crypto/finkinfo/gecko-sharp-2.0.info Thu Dec 13 18:23:15 2007 @@ -1,8 +1,8 @@ Package: gecko-sharp Version: 2.0 -Revision: 1039 +Revision: 1040 Type: bundle -Depends: %N-firefox15 (>= %v-%r) | %N-seamonkey (>= %v-%r) +Depends: %N-firefox2 (>= %v-%r) | %N-firefox15 (>= %v-%r) | %N-seamonkey (>= %v-%r) Description: Mozilla browser C# bindings: bundle License: OSI-Approved Maintainer: Benjamin Reed <[EMAIL PROTECTED]> Modified: trunk/experimental/common/crypto/finkinfo/gecko-sharp.info URL: http://svn.finkproject.org/websvn/diff.php?path=/trunk/experimental/common/crypto/finkinfo/gecko-sharp.info&rev=1087&repname=user%3a+ranger ============================================================================== --- trunk/experimental/common/crypto/finkinfo/gecko-sharp.info (original) +++ trunk/experimental/common/crypto/finkinfo/gecko-sharp.info Thu Dec 13 18:23:15 2007 @@ -1,22 +1,24 @@ Info2: << Package: gecko-sharp%type_pkg[gecko] Version: 2.0 -Revision: 1039 -Type: gecko (-firefox1.5 -seamonkey) +Revision: 1040 +Type: gecko (-firefox2 -firefox1.5 -seamonkey) Source: http://go-mono.com/sources/gecko-sharp-%v/gecko-sharp-%v-0.12.tar.gz Source-MD5: 226470d7be5150f9a8c4d119f61cc385 DocFiles: AUTHORS COPYING* ChangeLog INSTALL LICENSE* NEWS README -Replaces: monodoc, gecko-sharp, gecko-sharp-firefox1.5, gecko-sharp-firefox15, gecko-sharp-seamonkey -Conflicts: gecko-sharp (<< 2.0-13), gecko-sharp-firefox1.5, gecko-sharp-firefox15, gecko-sharp-seamonkey +Replaces: monodoc, gecko-sharp, gecko-sharp-firefox1.5, gecko-sharp-firefox2, gecko-sharp-firefox15, gecko-sharp-seamonkey +Conflicts: gecko-sharp (<< 2.0-13), gecko-sharp-firefox1.5, gecko-sharp-firefox2, gecko-sharp-firefox15, gecko-sharp-seamonkey Depends: << + (%type_raw[gecko] = -firefox2) firefox2-shlibs, (%type_raw[gecko] = -firefox1.5) firefox1.5-shlibs (>= 1.5.0.12-1002), (%type_raw[gecko] = -seamonkey) seamonkey-shlibs (>= 1.1.5-2), gtk-sharp2 (>= 2.10.2-1), mono (>= 1.2.6-1) << BuildDepends: << + (%type_raw[gecko] = -firefox2) firefox2-dev, (%type_raw[gecko] = -firefox1.5) firefox1.5-dev (>= 1.5.0.12-1002), - (%type_raw[gecko] = -seamonkey) seamonkey-dev (>= 1.1.5-2), + (%type_raw[gecko] = -seamonkey) seamonkey-dev (>= 1.1.5-2), atk1 (>= 1.20.0-1), cairo (>= 1.4-1), expat1, @@ -64,6 +66,8 @@ export MONODOC=%p/bin/monodocer if [ "%type_raw[gecko]" == "-firefox1.5" ]; then MOZILLA_FLAGS="--with-mozilla-headers=%p/include/firefox1.5 --with-mozilla-libs=%p/lib/firefox1.5" + elif [ "%type_raw[gecko]" == "-firefox2" ]; then + MOZILLA_FLAGS="--with-mozilla-headers=%p/include/firefox2 --with-mozilla-libs=%p/lib/firefox2" else MOZILLA_FLAGS="--with-mozilla-headers=%p/include/seamonkey --with-mozilla-libs=%p/lib/seamonkey" fi Modified: trunk/experimental/common/crypto/finkinfo/gecko-sharp1-0.6.info URL: http://svn.finkproject.org/websvn/diff.php?path=/trunk/experimental/common/crypto/finkinfo/gecko-sharp1-0.6.info&rev=1087&repname=user%3a+ranger ============================================================================== --- trunk/experimental/common/crypto/finkinfo/gecko-sharp1-0.6.info (original) +++ trunk/experimental/common/crypto/finkinfo/gecko-sharp1-0.6.info Thu Dec 13 18:23:15 2007 @@ -1,8 +1,8 @@ Package: gecko-sharp1 Version: 0.6 -Revision: 1025 +Revision: 1028 Type: bundle -Depends: %N-firefox15 (>= %v-%r) | %N-seamonkey (>= %v-%r) +Depends: %N-firefox2 (>= %v-%r) | %N-firefox15 (>= %v-%r) | %N-seamonkey (>= %v-%r) Description: Mozilla browser C# bindings: bundle License: OSI-Approved Maintainer: Benjamin Reed <[EMAIL PROTECTED]> Modified: trunk/experimental/common/crypto/finkinfo/gecko-sharp1.info URL: http://svn.finkproject.org/websvn/diff.php?path=/trunk/experimental/common/crypto/finkinfo/gecko-sharp1.info&rev=1087&repname=user%3a+ranger ============================================================================== --- trunk/experimental/common/crypto/finkinfo/gecko-sharp1.info (original) +++ trunk/experimental/common/crypto/finkinfo/gecko-sharp1.info Thu Dec 13 18:23:15 2007 @@ -1,22 +1,24 @@ Info2: << Package: gecko-sharp1%type_pkg[gecko] Version: 0.6 -Revision: 1027 -Type: gecko (-firefox1.5 -seamonkey) +Revision: 1028 +Type: gecko (-firefox2 -firefox1.5 -seamonkey) Source: http://go-mono.com/sources/gecko-sharp/gecko-sharp-%v.tar.gz Source-MD5: 9ce9bb08125f7c7eecf8bd696a3345bd Replaces: gecko-sharp1 Conflicts: gecko-sharp1 (<< 0.6-4) DocFiles: AUTHORS COPYING* ChangeLog INSTALL LICENSE* NEWS README Depends: << + (%type_raw[gecko] = -firefox2) firefox2-shlibs, (%type_raw[gecko] = -firefox1.5) firefox1.5-shlibs (>= 1.5.0.12-1002), - (%type_raw[gecko] = -seamonkey) seamonkey-shlibs (>= 1.1.5-2), + (%type_raw[gecko] = -seamonkey) seamonkey-shlibs (>= 1.1.5-2), gtk-sharp (>= 1.0.10-1030), mono (>= 1.2.6-1) << BuildDepends: << + (%type_raw[gecko] = -firefox2) firefox2-dev, (%type_raw[gecko] = -firefox1.5) firefox1.5-dev (>= 1.5.0.12-1002), - (%type_raw[gecko] = -seamonkey) seamonkey-dev (>= 1.1.5-2), + (%type_raw[gecko] = -seamonkey) seamonkey-dev (>= 1.1.5-2), atk1 (>= 1.20.0-1), cairo (>= 1.4-1), expat1, @@ -60,6 +62,8 @@ perl -pi -e 's/hardcode_direct=yes/hardcode_direct=no/g' configure if [ "%type_raw[gecko]" == "-firefox1.5" ]; then MOZILLA_FLAGS="--with-mozilla-headers=%p/include/firefox1.5 --with-mozilla-libs=%p/lib/firefox1.5" + elif [ "%type_raw[gecko]" == "-firefox2" ]; then + MOZILLA_FLAGS="--with-mozilla-headers=%p/include/firefox2 --with-mozilla-libs=%p/lib/firefox2" else MOZILLA_FLAGS="--with-mozilla-headers=%p/include/seamonkey --with-mozilla-libs=%p/lib/seamonkey" fi @@ -73,13 +77,14 @@ MAKEFLAGS=-j1 make install DESTDIR=%d for file in `find %i/lib -name gecko-sharp\*.config`; do + FFLIB=`echo %type_raw[gecko] | sed -e 's,^-,,'` cat <<END >$file <configuration> <dllmap dll="libglib-2.0-0.dll" target="%p/lib/libglib-2.0.0.dylib"/> <dllmap dll="libgobject-2.0-0.dll" target="%p/lib/libgobject-2.0.0.dylib"/> <dllmap dll="libatk-1.0-0.dll" target="%p/lib/libatk-1.0.0.dylib"/> <dllmap dll="libgtk-win32-2.0-0.dll" target="%p/lib/libgtk-x11-2.0.0.dylib"/> - <dllmap dll="gtkembedmoz.dll" target="%p/lib/firefox1.5/libgtkembedmoz.dylib"/> + <dllmap dll="gtkembedmoz.dll" target="%p/lib/$FFLIB/libgtkembedmoz.dylib"/> </configuration> END done Modified: trunk/experimental/common/crypto/finkinfo/gtk-sharp-monodoc.info URL: http://svn.finkproject.org/websvn/diff.php?path=/trunk/experimental/common/crypto/finkinfo/gtk-sharp-monodoc.info&rev=1087&repname=user%3a+ranger ============================================================================== --- trunk/experimental/common/crypto/finkinfo/gtk-sharp-monodoc.info (original) +++ trunk/experimental/common/crypto/finkinfo/gtk-sharp-monodoc.info Thu Dec 13 18:23:15 2007 @@ -46,7 +46,7 @@ << Depends: << gtk-sharp2 (>= %v-1), - mono-tools (>= 1.1.11-1) + mono-tools (>= 1.2.6-1) << Replaces: monodoc, gtk-sharp NoSetLDFLAGS: true Modified: trunk/experimental/common/crypto/finkinfo/gtksourceview-sharp.info URL: http://svn.finkproject.org/websvn/diff.php?path=/trunk/experimental/common/crypto/finkinfo/gtksourceview-sharp.info&rev=1087&repname=user%3a+ranger ============================================================================== --- trunk/experimental/common/crypto/finkinfo/gtksourceview-sharp.info (original) +++ trunk/experimental/common/crypto/finkinfo/gtksourceview-sharp.info Thu Dec 13 18:23:15 2007 @@ -1,6 +1,6 @@ Package: gtksourceview-sharp Version: 2.0 -Revision: 10 +Revision: 1030 Source: http://go-mono.com/sources/%n-%v/%n-%v-0.11.tar.bz2 Source-MD5: a8f56f02378b9b97e927748b099854a7 DocFiles: AUTHORS COPYING* ChangeLog INSTALL NEWS README @@ -8,7 +8,7 @@ gtk-sharp2 (>= 2.4.0-1), gtksourceview-shlibs (>= 1.8.5-1), mono (>= 1.2.6-1), - mono-tools (>= 1.1.11-1) + mono-tools (>= 1.2.6-1) << BuildDepends: << atk1 (>= 1.20.0-1), @@ -38,7 +38,7 @@ libpng3, libxml2 (>= 2.6.30-1), mono-dev (>= 1.2.6-1), - mono-tools (>= 1.1.11-1), + mono-tools (>= 1.2.6-1), orbit2-dev (>= 2.14.10-1), pango1-xft2-ft219-dev (>= 1.18.3-1), pkgconfig (>= 0.21-1), Modified: trunk/experimental/common/crypto/finkinfo/mono-tools.info URL: http://svn.finkproject.org/websvn/diff.php?path=/trunk/experimental/common/crypto/finkinfo/mono-tools.info&rev=1087&repname=user%3a+ranger ============================================================================== --- trunk/experimental/common/crypto/finkinfo/mono-tools.info (original) +++ trunk/experimental/common/crypto/finkinfo/mono-tools.info Thu Dec 13 18:23:15 2007 @@ -10,7 +10,7 @@ gnome-sharp2, gtk-sharp2, mono (>= 1.2.6-1), - monodoc (>= %v-1) + monodoc (>= 1.2.6-1) << BuildDepends: << atk1 (>= 1.20.0-1), @@ -36,7 +36,7 @@ libpng3, libxml2, mono-dev (>= 1.2.6-1), - monodoc (>= %v-1), + monodoc (>= 1.2.6-1), orbit2-dev (>= 2.14.10-1), pango1-xft2-ft219-dev (>= 1.18.3-1), pkgconfig (>= 0.21-1), Modified: trunk/experimental/common/crypto/finkinfo/monodevelop.info URL: http://svn.finkproject.org/websvn/diff.php?path=/trunk/experimental/common/crypto/finkinfo/monodevelop.info&rev=1087&repname=user%3a+ranger ============================================================================== --- trunk/experimental/common/crypto/finkinfo/monodevelop.info (original) +++ trunk/experimental/common/crypto/finkinfo/monodevelop.info Thu Dec 13 18:23:15 2007 @@ -21,11 +21,11 @@ gecko-sharp (>= 2.0-12), gnome-sharp2, gtk-sharp2 (>= 2.4.2-2), - gtk-sharp-monodoc (>= 2.4.2-2), + gtk-sharp-monodoc (>= 1.2.6-1), gtksourceview-sharp (>= 2.0-1029), ikvm (>= 0.22.0.0-1), mono (>= 1.2.6-1), - mono-tools (>= 1.1.11-5) + mono-tools (>= 1.2.6-1) << BuildDepends: << atk1 (>= 1.20.0-1), @@ -33,11 +33,11 @@ cairo, desktop-file-utils (>= 0.14-1), expat1, - firefox1.5-dev, + firefox2-dev, fontconfig2-dev (>= 2.4.1-1), freetype219 (>= 2.3.5-1), gconf2-dev (>= 2.20.1-1), - gecko-sharp-firefox15, + gecko-sharp-firefox2, glib2-dev (>= 2.14.0-1), gnome-sharp2, gnome-vfs2-unified-dev (>= 1:2.20.0-1), @@ -52,15 +52,14 @@ libgnome2-dev (>= 2.20.0-1), libgnomeui2-dev (>= 2.20.0-1), libiconv-dev, - libicu31-dev, - libicu32-dev, + libicu36-dev | libicu32-dev, libidl2 (>= 0.8.9-1), libjpeg, libpng3, libxml2, mono-dev (>= 1.2.6-1), - mono-tools (>= 1.1.11-5), - monodoc (>= 1.2.3-1), + mono-tools (>= 1.2.6-1), + monodoc (>= 1.2.6-1), orbit2-dev (>= 2.14.10-1), pango1-xft2-ft219-dev (>= 1.18.3-1), pkgconfig (>= 0.21-1), @@ -85,7 +84,7 @@ #!/bin/sh -ex export MONO_PATH="%i/lib:`pwd`/build/bin:`pwd`/build/AddIns/BackendBindings:$MONO_PATH" - export MOZILLA_FIVE_HOME="%p/lib/firefox1.5" + export MOZILLA_FIVE_HOME="%p/lib/firefox2" export lt_cv_sys_max_cmd_len=65536 perl -pi -e 's/hardcode_direct=yes/hardcode_direct=no/g;' configure ./configure %c Modified: trunk/experimental/common/main/finkinfo/devel/nant.info URL: http://svn.finkproject.org/websvn/diff.php?path=/trunk/experimental/common/main/finkinfo/devel/nant.info&rev=1087&repname=user%3a+ranger ============================================================================== --- trunk/experimental/common/main/finkinfo/devel/nant.info (original) +++ trunk/experimental/common/main/finkinfo/devel/nant.info Thu Dec 13 18:23:15 2007 @@ -1,6 +1,6 @@ Package: nant Version: 0.85 -Revision: 18 +Revision: 1038 #Source: mirror:sourceforge:%n/%n-%v-rc3-src.tar.gz Source: http://go-mono.com/sources/%n/%n-%v-src.tar.gz Modified: trunk/experimental/common/main/finkinfo/languages/mono.info URL: http://svn.finkproject.org/websvn/diff.php?path=/trunk/experimental/common/main/finkinfo/languages/mono.info&rev=1087&repname=user%3a+ranger ============================================================================== --- trunk/experimental/common/main/finkinfo/languages/mono.info (original) +++ trunk/experimental/common/main/finkinfo/languages/mono.info Thu Dec 13 18:23:15 2007 @@ -17,19 +17,17 @@ fink (>= 0.22.2-1), fontconfig2-dev (>= 2.4.1-1), freetype219 (>= 2.3.5-1), - gc (>= 7.0-1), gettext-tools, glib2-dev (>= 2.14.0-1), glitz (>= 0.4.4-1), libgettext3-dev, libiconv-dev, libicu32-dev | libicu36-dev, - libpixman1 (>= 0.1.5-1), libpng3, pkgconfig (>= 0.21-1), system-java14-dev << -BuildConflicts: libicu26-dev, libicu28-dev, libicu30-dev +BuildConflicts: libicu26-dev, libicu28-dev, libicu30-dev, gc Replaces: %N-dev (<< %v-%r) Type: java(1.4) Homepage: http://go-mono.com/ @@ -90,7 +88,6 @@ Replaces: %N (<< %v-%r) Depends: << cairo-shlibs (>= 1.2-1), - gc-shlibs (>= 7.0-1), glib2-shlibs (>= 2.14.0-1), macosx (>= 10.4.3-1) << Modified: trunk/experimental/common/main/finkinfo/languages/mono.patch URL: http://svn.finkproject.org/websvn/diff.php?path=/trunk/experimental/common/main/finkinfo/languages/mono.patch&rev=1087&repname=user%3a+ranger ============================================================================== --- trunk/experimental/common/main/finkinfo/languages/mono.patch (original) +++ trunk/experimental/common/main/finkinfo/languages/mono.patch Thu Dec 13 18:23:15 2007 @@ -56,1034 +56,6 @@ <dllmap dll="i:kernel32.dll"> <dllentry dll="__Internal" name="CopyMemory" target="mono_win32_compat_CopyMemory"/> <dllentry dll="__Internal" name="FillMemory" target="mono_win32_compat_FillMemory"/> -diff -uNr mono-1.2.6/libgc/darwin_stop_world.c mono-1.2.6-new/libgc/darwin_stop_world.c ---- mono-1.2.6/libgc/darwin_stop_world.c 2007-11-08 17:07:02.000000000 -0500 -+++ mono-1.2.6-new/libgc/darwin_stop_world.c 2007-11-29 17:38:30.000000000 -0500 -@@ -1,5 +1,7 @@ - #include "private/pthread_support.h" - -+/* This probably needs more porting work to ppc64. */ -+ - # if defined(GC_DARWIN_THREADS) - - /* From "Inside Mac OS X - Mach-O Runtime Architecture" published by Apple -@@ -8,7 +10,7 @@ - be allocated, is called the red zone. This area as shown in Figure 3-2 may - be used for any purpose as long as a new stack frame does not need to be - added to the stack." -- -+ - Page 50: "If a leaf procedure's red zone usage would exceed 224 bytes, then - it must set up a stack frame just like routines that call other routines." - */ -@@ -28,15 +30,16 @@ - unsigned long savedRTOC; - } StackFrame; - --unsigned long FindTopOfStack(unsigned int stack_start) { -+unsigned long FindTopOfStack(unsigned int stack_start) -+{ - StackFrame *frame; -- -+ - if (stack_start == 0) { - # ifdef POWERPC - # if CPP_WORDSZ == 32 - __asm__ volatile("lwz %0,0(r1)" : "=r" (frame)); - # else -- __asm__ volatile("ldz %0,0(r1)" : "=r" (frame)); -+ __asm__ volatile("ld %0,0(r1)" : "=r" (frame)); - # endif - # endif - } else { -@@ -44,356 +47,310 @@ - } - - # ifdef DEBUG_THREADS -- /* GC_printf1("FindTopOfStack start at sp = %p\n", frame); */ -+ /* GC_printf("FindTopOfStack start at sp = %p\n", frame); */ - # endif - do { -- if (frame->savedSP == 0) break; -- /* if there are no more stack frames, stop */ -+ if (frame->savedSP == 0) -+ break; -+ /* if there are no more stack frames, stop */ - - frame = (StackFrame*)frame->savedSP; - - /* we do these next two checks after going to the next frame - because the LR for the first stack frame in the loop - is not set up on purpose, so we shouldn't check it. */ -- if ((frame->savedLR & ~3) == 0) break; /* if the next LR is bogus, stop */ -- if ((~(frame->savedLR) & ~3) == 0) break; /* ditto */ -- } while (1); -+ if ((frame->savedLR & ~3) == 0) -+ break; /* if the next LR is bogus, stop */ -+ if ((~(frame->savedLR) & ~3) == 0) -+ break; /* ditto */ -+ } while (1); - - # ifdef DEBUG_THREADS -- /* GC_printf1("FindTopOfStack finish at sp = %p\n", frame); */ -+ /* GC_printf("FindTopOfStack finish at sp = %p\n", frame); */ - # endif - - return (unsigned long)frame; --} -+} - - #ifdef DARWIN_DONT_PARSE_STACK --void GC_push_all_stacks() { -+void GC_push_all_stacks() -+{ - int i; - kern_return_t r; - GC_thread p; - pthread_t me; - ptr_t lo, hi; --#if defined(POWERPC) -- ppc_thread_state_t state; -- mach_msg_type_number_t thread_state_count = PPC_THREAD_STATE_COUNT; --#elif defined(I386) -- i386_thread_state_t state; -- mach_msg_type_number_t thread_state_count = i386_THREAD_STATE_COUNT; --#else --# error FIXME for non-x86 || ppc architectures -- mach_msg_type_number_t thread_state_count = MACHINE_THREAD_STATE_COUNT; --#endif -- -+ GC_THREAD_STATE_T state; -+ /* MACHINE_THREAD_STATE_COUNT doesn't seem to be defined everywhere. */ -+ /* Hence we use our own version. */ -+ mach_msg_type_number_t thread_state_count = GC_MACH_THREAD_STATE_COUNT; -+ - me = pthread_self(); -- if (!GC_thr_initialized) GC_thr_init(); -- -- for(i=0;i<THREAD_TABLE_SZ;i++) { -- for(p=GC_threads[i];p!=0;p=p->next) { -- if(p -> flags & FINISHED) continue; -- if(pthread_equal(p->id,me)) { -+ if (!GC_thr_initialized) -+ GC_thr_init(); -+ -+ for(i = 0; i < THREAD_TABLE_SZ; i++) { -+ for(p = GC_threads[i]; p != 0; p = p->next) { -+ if(p->flags & FINISHED) continue; -+ if(pthread_equal(p->id, me)) { - lo = GC_approx_sp(); - } else { - /* Get the thread state (registers, etc) */ -- r = thread_get_state( -- p->stop_info.mach_thread, -- GC_MACH_THREAD_STATE_FLAVOR, -- (natural_t*)&state, -- &thread_state_count); -- if(r != KERN_SUCCESS) ABORT("thread_get_state failed"); -- --#if defined(I386) --#if defined(_STRUCT_X86_EXCEPTION_STATE32) -- 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); --#else -- 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); --#endif --#elif defined(POWERPC) --#if defined(_STRUCT_PPC_EXCEPTION_STATE) -- lo = (void*)(state.__r1 - PPC_RED_ZONE_SIZE); -- -- GC_push_one(state.__r0); -- GC_push_one(state.__r2); -- GC_push_one(state.__r3); -- GC_push_one(state.__r4); -- GC_push_one(state.__r5); -- GC_push_one(state.__r6); -- GC_push_one(state.__r7); -- GC_push_one(state.__r8); -- GC_push_one(state.__r9); -- GC_push_one(state.__r10); -- GC_push_one(state.__r11); -- GC_push_one(state.__r12); -- GC_push_one(state.__r13); -- GC_push_one(state.__r14); -- GC_push_one(state.__r15); -- GC_push_one(state.__r16); -- GC_push_one(state.__r17); -- GC_push_one(state.__r18); -- GC_push_one(state.__r19); -- GC_push_one(state.__r20); -- GC_push_one(state.__r21); -- GC_push_one(state.__r22); -- GC_push_one(state.__r23); -- GC_push_one(state.__r24); -- GC_push_one(state.__r25); -- GC_push_one(state.__r26); -- GC_push_one(state.__r27); -- GC_push_one(state.__r28); -- GC_push_one(state.__r29); -- GC_push_one(state.__r30); -- GC_push_one(state.__r31); --#else -- lo = (void*)(state.r1 - PPC_RED_ZONE_SIZE); -- -- GC_push_one(state.r0); -- GC_push_one(state.r2); -- GC_push_one(state.r3); -- GC_push_one(state.r4); -- GC_push_one(state.r5); -- GC_push_one(state.r6); -- GC_push_one(state.r7); -- GC_push_one(state.r8); -- GC_push_one(state.r9); -- GC_push_one(state.r10); -- GC_push_one(state.r11); -- GC_push_one(state.r12); -- GC_push_one(state.r13); -- GC_push_one(state.r14); -- GC_push_one(state.r15); -- GC_push_one(state.r16); -- GC_push_one(state.r17); -- GC_push_one(state.r18); -- GC_push_one(state.r19); -- GC_push_one(state.r20); -- GC_push_one(state.r21); -- GC_push_one(state.r22); -- GC_push_one(state.r23); -- GC_push_one(state.r24); -- GC_push_one(state.r25); -- GC_push_one(state.r26); -- GC_push_one(state.r27); -- GC_push_one(state.r28); -- GC_push_one(state.r29); -- GC_push_one(state.r30); -- GC_push_one(state.r31); --#endif --#else --# error FIXME for non-x86 || ppc architectures --#endif -+ r = thread_get_state(p->stop_info.mach_thread, GC_MACH_THREAD_STATE, -+ (natural_t*)&state, &thread_state_count); -+ -+# ifdef DEBUG_THREADS -+ GC_printf("thread_get_state return value = %d\n", r); -+# endif -+ -+ if(r != KERN_SUCCESS) -+ ABORT("thread_get_state failed"); -+ -+# if defined(I386) -+ lo = (void*)state . THREAD_FLD (esp); -+ GC_push_one(state . THREAD_FLD (eax)); -+ GC_push_one(state . THREAD_FLD (ebx)); -+ GC_push_one(state . THREAD_FLD (ecx)); -+ GC_push_one(state . THREAD_FLD (edx)); -+ GC_push_one(state . THREAD_FLD (edi)); -+ GC_push_one(state . THREAD_FLD (esi)); -+ GC_push_one(state . THREAD_FLD (ebp)); -+ -+# elif defined(X86_64) -+ lo = (void*)state . THREAD_FLD (rsp); -+ GC_push_one(state . THREAD_FLD (rax)); -+ GC_push_one(state . THREAD_FLD (rbx)); -+ GC_push_one(state . THREAD_FLD (rcx)); -+ GC_push_one(state . THREAD_FLD (rdx)); -+ GC_push_one(state . THREAD_FLD (rdi)); -+ GC_push_one(state . THREAD_FLD (rsi)); -+ GC_push_one(state . THREAD_FLD (rbp)); -+ GC_push_one(state . THREAD_FLD (rsp)); -+ GC_push_one(state . THREAD_FLD (r8)); -+ GC_push_one(state . THREAD_FLD (r9)); -+ GC_push_one(state . THREAD_FLD (r10)); -+ GC_push_one(state . THREAD_FLD (r11)); -+ GC_push_one(state . THREAD_FLD (r12)); -+ GC_push_one(state . THREAD_FLD (r13)); -+ GC_push_one(state . THREAD_FLD (r14)); -+ GC_push_one(state . THREAD_FLD (r15)); -+ GC_push_one(state . THREAD_FLD (rip)); -+ GC_push_one(state . THREAD_FLD (rflags)); -+ GC_push_one(state . THREAD_FLD (cs)); -+ GC_push_one(state . THREAD_FLD (fs)); -+ GC_push_one(state . THREAD_FLD (gs)); -+ -+# elif defined(POWERPC) -+ lo = (void*)(state . THREAD_FLD (r1) - PPC_RED_ZONE_SIZE); -+ -+ GC_push_one(state . THREAD_FLD (r0)); -+ GC_push_one(state . THREAD_FLD (r2)); -+ GC_push_one(state . THREAD_FLD (r3)); -+ GC_push_one(state . THREAD_FLD (r4)); -+ GC_push_one(state . THREAD_FLD (r5)); -+ GC_push_one(state . THREAD_FLD (r6)); -+ GC_push_one(state . THREAD_FLD (r7)); -+ GC_push_one(state . THREAD_FLD (r8)); -+ GC_push_one(state . THREAD_FLD (r9)); -+ GC_push_one(state . THREAD_FLD (r10)); -+ GC_push_one(state . THREAD_FLD (r11)); -+ GC_push_one(state . THREAD_FLD (r12)); -+ GC_push_one(state . THREAD_FLD (r13)); -+ GC_push_one(state . THREAD_FLD (r14)); -+ GC_push_one(state . THREAD_FLD (r15)); -+ GC_push_one(state . THREAD_FLD (r16)); -+ GC_push_one(state . THREAD_FLD (r17)); -+ GC_push_one(state . THREAD_FLD (r18)); -+ GC_push_one(state . THREAD_FLD (r19)); -+ GC_push_one(state . THREAD_FLD (r20)); -+ GC_push_one(state . THREAD_FLD (r21)); -+ GC_push_one(state . THREAD_FLD (r22)); -+ GC_push_one(state . THREAD_FLD (r23)); -+ GC_push_one(state . THREAD_FLD (r24)); -+ GC_push_one(state . THREAD_FLD (r25)); -+ GC_push_one(state . THREAD_FLD (r26)); -+ GC_push_one(state . THREAD_FLD (r27)); -+ GC_push_one(state . THREAD_FLD (r28)); -+ GC_push_one(state . THREAD_FLD (r29)); -+ GC_push_one(state . THREAD_FLD (r30)); -+ GC_push_one(state . THREAD_FLD (r31)); -+# else -+# error FIXME for non-x86 || ppc architectures -+# endif - } /* p != me */ - if(p->flags & MAIN_THREAD) - hi = GC_stackbottom; - else - hi = p->stack_end; --#if DEBUG_THREADS -- GC_printf3("Darwin: Stack for thread 0x%lx = [%lx,%lx)\n", -- (unsigned long) p -> id, -- (unsigned long) lo, -- (unsigned long) hi -- ); --#endif -- GC_push_all_stack(lo,hi); -+# if DEBUG_THREADS -+ GC_printf("Darwin: Stack for thread 0x%lx = [%lx,%lx)\n", -+ (unsigned long) p -> id, (unsigned long) lo, -+ (unsigned long) hi); -+# endif -+ GC_push_all_stack(lo, hi); - } /* for(p=GC_threads[i]...) */ - } /* for(i=0;i<THREAD_TABLE_SZ...) */ - } - - #else /* !DARWIN_DONT_PARSE_STACK; Use FindTopOfStack() */ - --void GC_push_all_stacks() { -- int i; -- task_t my_task; -- kern_return_t r; -- mach_port_t me; -- ptr_t lo, hi; -- thread_act_array_t act_list = 0; -- mach_msg_type_number_t listcount = 0; -- -- me = mach_thread_self(); -- if (!GC_thr_initialized) GC_thr_init(); -- -- my_task = current_task(); -- r = task_threads(my_task, &act_list, &listcount); -- if(r != KERN_SUCCESS) ABORT("task_threads failed"); -- for(i = 0; i < listcount; i++) { -- thread_act_t thread = act_list[i]; -- if (thread == me) { -- lo = GC_approx_sp(); -- hi = (ptr_t)FindTopOfStack(0); -- } else { -+void GC_push_all_stacks() -+{ -+ unsigned int i; -+ task_t my_task; -+ kern_return_t r; -+ mach_port_t me; -+ ptr_t lo, hi; -+ thread_act_array_t act_list = 0; -+ mach_msg_type_number_t listcount = 0; -+ -+ me = mach_thread_self(); -+ if (!GC_thr_initialized) -+ GC_thr_init(); -+ -+ my_task = current_task(); -+ r = task_threads(my_task, &act_list, &listcount); -+ if(r != KERN_SUCCESS) -+ ABORT("task_threads failed"); -+ for(i = 0; i < listcount; i++) { -+ thread_act_t thread = act_list[i]; -+ if (thread == me) { -+ lo = GC_approx_sp(); -+ hi = (ptr_t)FindTopOfStack(0); -+ } else { - # if defined(POWERPC) --# if CPP_WORDSZ == 32 -- ppc_thread_state_t info; --# else -- ppc_thread_state64_t info; --# endif -+ GC_THREAD_STATE_T info; - mach_msg_type_number_t outCount = THREAD_STATE_MAX; -- r = thread_get_state(thread, GC_MACH_THREAD_STATE_FLAVOR, -- (natural_t *)&info, &outCount); -- if(r != KERN_SUCCESS) continue; -- --#if defined(_STRUCT_PPC_EXCEPTION_STATE) -- lo = (void*)(info.__r1 - PPC_RED_ZONE_SIZE); -- hi = (ptr_t)FindTopOfStack(info.__r1); -- -- GC_push_one(info.__r0); -- GC_push_one(info.__r2); -- GC_push_one(info.__r3); -- GC_push_one(info.__r4); -- GC_push_one(info.__r5); -- GC_push_one(info.__r6); -- GC_push_one(info.__r7); -- GC_push_one(info.__r8); -- GC_push_one(info.__r9); -- GC_push_one(info.__r10); -- GC_push_one(info.__r11); -- GC_push_one(info.__r12); -- GC_push_one(info.__r13); -- GC_push_one(info.__r14); -- GC_push_one(info.__r15); -- GC_push_one(info.__r16); -- GC_push_one(info.__r17); -- GC_push_one(info.__r18); -- GC_push_one(info.__r19); -- GC_push_one(info.__r20); -- GC_push_one(info.__r21); -- GC_push_one(info.__r22); -- GC_push_one(info.__r23); -- GC_push_one(info.__r24); -- GC_push_one(info.__r25); -- GC_push_one(info.__r26); -- GC_push_one(info.__r27); -- GC_push_one(info.__r28); -- GC_push_one(info.__r29); -- GC_push_one(info.__r30); -- GC_push_one(info.__r31); --#else -- lo = (void*)(info.r1 - PPC_RED_ZONE_SIZE); -- hi = (ptr_t)FindTopOfStack(info.r1); -- -- GC_push_one(info.r0); -- GC_push_one(info.r2); -- GC_push_one(info.r3); -- GC_push_one(info.r4); -- GC_push_one(info.r5); -- GC_push_one(info.r6); -- GC_push_one(info.r7); -- GC_push_one(info.r8); -- GC_push_one(info.r9); -- GC_push_one(info.r10); -- GC_push_one(info.r11); -- GC_push_one(info.r12); -- GC_push_one(info.r13); -- GC_push_one(info.r14); -- GC_push_one(info.r15); -- GC_push_one(info.r16); -- GC_push_one(info.r17); -- GC_push_one(info.r18); -- GC_push_one(info.r19); -- GC_push_one(info.r20); -- GC_push_one(info.r21); -- GC_push_one(info.r22); -- GC_push_one(info.r23); -- GC_push_one(info.r24); -- GC_push_one(info.r25); -- GC_push_one(info.r26); -- GC_push_one(info.r27); -- GC_push_one(info.r28); -- GC_push_one(info.r29); -- GC_push_one(info.r30); -- GC_push_one(info.r31); --#endif --# else -+ r = thread_get_state(thread, GC_MACH_THREAD_STATE, (natural_t *)&info, -+ &outCount); -+ if(r != KERN_SUCCESS) -+ ABORT("task_get_state failed"); -+ -+ lo = (void*)(info . THREAD_FLD (r1) - PPC_RED_ZONE_SIZE); -+ hi = (ptr_t)FindTopOfStack(info . THREAD_FLD (r1)); -+ -+ GC_push_one(info . THREAD_FLD (r0)); -+ GC_push_one(info . THREAD_FLD (r2)); -+ GC_push_one(info . THREAD_FLD (r3)); -+ GC_push_one(info . THREAD_FLD (r4)); -+ GC_push_one(info . THREAD_FLD (r5)); -+ GC_push_one(info . THREAD_FLD (r6)); -+ GC_push_one(info . THREAD_FLD (r7)); -+ GC_push_one(info . THREAD_FLD (r8)); -+ GC_push_one(info . THREAD_FLD (r9)); -+ GC_push_one(info . THREAD_FLD (r10)); -+ GC_push_one(info . THREAD_FLD (r11)); -+ GC_push_one(info . THREAD_FLD (r12)); -+ GC_push_one(info . THREAD_FLD (r13)); -+ GC_push_one(info . THREAD_FLD (r14)); -+ GC_push_one(info . THREAD_FLD (r15)); -+ GC_push_one(info . THREAD_FLD (r16)); -+ GC_push_one(info . THREAD_FLD (r17)); -+ GC_push_one(info . THREAD_FLD (r18)); -+ GC_push_one(info . THREAD_FLD (r19)); -+ GC_push_one(info . THREAD_FLD (r20)); -+ GC_push_one(info . THREAD_FLD (r21)); -+ GC_push_one(info . THREAD_FLD (r22)); -+ GC_push_one(info . THREAD_FLD (r23)); -+ GC_push_one(info . THREAD_FLD (r24)); -+ GC_push_one(info . THREAD_FLD (r25)); -+ GC_push_one(info . THREAD_FLD (r26)); -+ GC_push_one(info . THREAD_FLD (r27)); -+ GC_push_one(info . THREAD_FLD (r28)); -+ GC_push_one(info . THREAD_FLD (r29)); -+ GC_push_one(info . THREAD_FLD (r30)); -+ GC_push_one(info . THREAD_FLD (r31)); -+ -+# elif defined(I386) - /* FIXME: Remove after testing: */ - WARN("This is completely untested and likely will not work\n", 0); -- i386_thread_state_t info; -+ GC_THREAD_STATE_T info; - mach_msg_type_number_t outCount = THREAD_STATE_MAX; -- r = thread_get_state(thread, GC_MACH_THREAD_STATE_FLAVOR, -- (natural_t *)&info, &outCount); -- if(r != KERN_SUCCESS) continue; -- --#if defined(_STRUCT_X86_EXCEPTION_STATE32) -- lo = (void*)info.__esp; -- hi = (ptr_t)FindTopOfStack(info.__esp); -- -- GC_push_one(info.__eax); -- GC_push_one(info.__ebx); -- GC_push_one(info.__ecx); -- GC_push_one(info.__edx); -- GC_push_one(info.__edi); -- GC_push_one(info.__esi); -- GC_push_one(info.__ebp); -- /* GC_push_one(info.__esp); */ -- GC_push_one(info.__ss); -- GC_push_one(info.__eip); -- GC_push_one(info.__cs); -- GC_push_one(info.__ds); -- GC_push_one(info.__es); -- GC_push_one(info.__fs); -- GC_push_one(info.__gs); --#else -- lo = (void*)info.esp; -- hi = (ptr_t)FindTopOfStack(info.esp); -- -- GC_push_one(info.eax); -- GC_push_one(info.ebx); -- GC_push_one(info.ecx); -- GC_push_one(info.edx); -- GC_push_one(info.edi); -- GC_push_one(info.esi); -- GC_push_one(info.ebp); -- /* GC_push_one(info.esp); */ -- GC_push_one(info.ss); -- GC_push_one(info.eip); -- GC_push_one(info.cs); -- GC_push_one(info.ds); -- GC_push_one(info.es); -- GC_push_one(info.fs); -- GC_push_one(info.gs); --#endif --# endif /* !POWERPC */ -+ r = thread_get_state(thread, GC_MACH_THREAD_STATE, (natural_t *)&info, -+ &outCount); -+ if(r != KERN_SUCCESS) -+ ABORT("task_get_state failed"); -+ -+ lo = (void*)info . THREAD_FLD (esp); -+ hi = (ptr_t)FindTopOfStack(info . THREAD_FLD (esp)); -+ -+ GC_push_one(info . THREAD_FLD (eax)); -+ GC_push_one(info . THREAD_FLD (ebx)); -+ GC_push_one(info . THREAD_FLD (ecx)); -+ GC_push_one(info . THREAD_FLD (edx)); -+ GC_push_one(info . THREAD_FLD (edi)); -+ GC_push_one(info . THREAD_FLD (esi)); -+ /* GC_push_one(info . THREAD_FLD (ebp)); */ -+ /* GC_push_one(info . THREAD_FLD (esp)); */ -+ GC_push_one(info . THREAD_FLD (ss)); -+ GC_push_one(info . THREAD_FLD (eip)); -+ GC_push_one(info . THREAD_FLD (cs)); -+ GC_push_one(info . THREAD_FLD (ds)); -+ GC_push_one(info . THREAD_FLD (es)); -+ GC_push_one(info . THREAD_FLD (fs)); -+ GC_push_one(info . THREAD_FLD (gs)); -+ -+# elif defined(X86_64) -+ GC_THREAD_STATE_T info; -+ mach_msg_type_number_t outCount = THREAD_STATE_MAX; -+ r = thread_get_state(thread, GC_MACH_THREAD_STATE, (natural_t *)&info, -+ &outCount); -+ if(r != KERN_SUCCESS) -+ ABORT("task_get_state failed"); -+ -+ lo = (void*)info . THREAD_FLD (rsp); -+ hi = (ptr_t)FindTopOfStack(info . THREAD_FLD (rsp)); -+ -+ GC_push_one(info . THREAD_FLD (rax)); -+ GC_push_one(info . THREAD_FLD (rbx)); -+ GC_push_one(info . THREAD_FLD (rcx)); -+ GC_push_one(info . THREAD_FLD (rdx)); -+ GC_push_one(info . THREAD_FLD (rdi)); -+ GC_push_one(info . THREAD_FLD (rsi)); -+ GC_push_one(info . THREAD_FLD (rbp)); -+ GC_push_one(info . THREAD_FLD (rsp)); -+ GC_push_one(info . THREAD_FLD (r8)); -+ GC_push_one(info . THREAD_FLD (r9)); -+ GC_push_one(info . THREAD_FLD (r10)); -+ GC_push_one(info . THREAD_FLD (r11)); -+ GC_push_one(info . THREAD_FLD (r12)); -+ GC_push_one(info . THREAD_FLD (r13)); -+ GC_push_one(info . THREAD_FLD (r14)); -+ GC_push_one(info . THREAD_FLD (r15)); -+ GC_push_one(info . THREAD_FLD (rip)); -+ GC_push_one(info . THREAD_FLD (rflags)); -+ GC_push_one(info . THREAD_FLD (cs)); -+ GC_push_one(info . THREAD_FLD (fs)); -+ GC_push_one(info . THREAD_FLD (gs)); -+ -+# else -+# error FIXME for non-x86 || ppc architectures -+# endif - } - # if DEBUG_THREADS -- GC_printf3("Darwin: Stack for thread 0x%lx = [%lx,%lx)\n", -- (unsigned long) thread, -- (unsigned long) lo, -- (unsigned long) hi -- ); -+ GC_printf("Darwin: Stack for thread 0x%lx = [%p,%p)\n", -+ (unsigned long) thread, lo, hi); - # endif - GC_push_all_stack(lo, hi); -- mach_port_deallocate(my_task, thread); -+ mach_port_deallocate(my_task, thread); - } /* for(p=GC_threads[i]...) */ -- vm_deallocate(my_task, (vm_address_t)act_list, sizeof(thread_t) * listcount); -- mach_port_deallocate(my_task, me); -+ vm_deallocate(my_task, (vm_address_t)act_list, -+ sizeof(thread_t) * listcount); -+ mach_port_deallocate(my_task, me); - } - #endif /* !DARWIN_DONT_PARSE_STACK */ - - static mach_port_t GC_mach_handler_thread; - static int GC_use_mach_handler_thread = 0; - --#define SUSPEND_THREADS_SIZE 2048 --static struct GC_mach_thread GC_mach_threads[SUSPEND_THREADS_SIZE]; -+static struct GC_mach_thread GC_mach_threads[THREAD_TABLE_SZ]; - static int GC_mach_threads_count; - --void GC_stop_init() { -+void GC_stop_init() -+{ - int i; - -- for (i = 0; i < SUSPEND_THREADS_SIZE; i++) { -+ for (i = 0; i < THREAD_TABLE_SZ; i++) { - GC_mach_threads[i].thread = 0; - GC_mach_threads[i].already_suspended = 0; - } -@@ -401,8 +358,9 @@ - } - - /* returns true if there's a thread in act_list that wasn't in old_list */ --int GC_suspend_thread_list(thread_act_array_t act_list, int count, -- thread_act_array_t old_list, int old_count) { -+int GC_suspend_thread_list(thread_act_array_t act_list, int count, -+ thread_act_array_t old_list, int old_count) -+{ - mach_port_t my_thread = mach_thread_self(); - int i, j; - -@@ -410,8 +368,8 @@ - - for(i = 0; i < count; i++) { - thread_act_t thread = act_list[i]; --# if DEBUG_THREADS -- GC_printf1("Attempting to suspend thread %p\n", thread); -+# if DEBUG_THREADS -+ GC_printf("Attempting to suspend thread %p\n", thread); - # endif - /* find the current thread in the old list */ - int found = 0; -@@ -428,53 +386,55 @@ - /* default is not suspended */ - GC_mach_threads[GC_mach_threads_count].already_suspended = 0; - changed = 1; -- } -+ } - -- if (thread != my_thread && -- (!GC_use_mach_handler_thread -- || (GC_use_mach_handler_thread -- && GC_mach_handler_thread != thread))) { -+ if (thread != my_thread -+ && (!GC_use_mach_handler_thread -+ || (GC_use_mach_handler_thread -+ && GC_mach_handler_thread != thread))) { - struct thread_basic_info info; - mach_msg_type_number_t outCount = THREAD_INFO_MAX; - kern_return_t kern_result = thread_info(thread, THREAD_BASIC_INFO, - (thread_info_t)&info, &outCount); - if(kern_result != KERN_SUCCESS) { -- /* the thread may have quit since the thread_threads () call -+ /* the thread may have quit since the thread_threads () call - * we mark already_suspended so it's not dealt with anymore later - */ -- if (!found) { -+ if (!found) { - GC_mach_threads[GC_mach_threads_count].already_suspended = TRUE; -- GC_mach_threads_count++; -+ GC_mach_threads_count++; - } - continue; - } - # if DEBUG_THREADS -- GC_printf2("Thread state for 0x%lx = %d\n", thread, info.run_state); -+ GC_printf("Thread state for 0x%lx = %d\n", (unsigned long)thread, -+ info.run_state); - # endif - if (!found) { -- GC_mach_threads[GC_mach_threads_count].already_suspended = info.suspend_count; -+ GC_mach_threads[GC_mach_threads_count].already_suspended -+ = info.suspend_count; - } -- if (info.suspend_count) continue; -- -+ if (info.suspend_count) -+ continue; -+ - # if DEBUG_THREADS -- GC_printf1("Suspending 0x%lx\n", thread); -+ GC_printf("Suspending 0x%lx\n", (unsigned long)thread); - # endif - /* Suspend the thread */ - kern_result = thread_suspend(thread); - if(kern_result != KERN_SUCCESS) { -- /* the thread may have quit since the thread_threads () call -+ /* the thread may have quit since the thread_threads () call - * we mark already_suspended so it's not dealt with anymore later - */ -- if (!found) { -+ if (!found) { - GC_mach_threads[GC_mach_threads_count].already_suspended = TRUE; -- GC_mach_threads_count++; -+ GC_mach_threads_count++; - } - continue; - } -- } -+ } - if (!found) GC_mach_threads_count++; - } -- - mach_port_deallocate(current_task(), my_thread); - return changed; - } -@@ -483,21 +443,21 @@ - /* Caller holds allocation lock. */ - void GC_stop_world() - { -- int i, changes; -- GC_thread p; -- task_t my_task = current_task(); -+ unsigned int i, changes; -+ task_t my_task = current_task(); - mach_port_t my_thread = mach_thread_self(); - kern_return_t kern_result; - thread_act_array_t act_list, prev_list; - mach_msg_type_number_t listcount, prevcount; -- -+ - # if DEBUG_THREADS -- GC_printf1("Stopping the world from 0x%lx\n", mach_thread_self()); -+ GC_printf("Stopping the world from 0x%lx\n", -+ (unsigned long)mach_thread_self()); - # endif - - /* clear out the mach threads list table */ -- GC_stop_init(); -- -+ GC_stop_init(); -+ - /* Make sure all free list construction has stopped before we start. */ - /* No new construction can start, since free list construction is */ - /* required to acquire and release the GC lock before it starts, */ -@@ -508,59 +468,59 @@ - /* We should have previously waited for it to become zero. */ - # endif /* PARALLEL_MARK */ - -- /* Loop stopping threads until you have gone over the whole list -- twice without a new one appearing. thread_create() won't -- return (and thus the thread stop) until the new thread -- exists, so there is no window whereby you could stop a -- thread, recognise it is stopped, but then have a new thread -- it created before stopping show up later. -- */ -- -- changes = 1; -- prev_list = NULL; -- prevcount = 0; -- do { -- int result; -- kern_result = task_threads(my_task, &act_list, &listcount); -- -- if(kern_result == KERN_SUCCESS) { -- result = GC_suspend_thread_list(act_list, listcount, -- prev_list, prevcount); -- changes = result; -- -- if(prev_list != NULL) { -- for(i = 0; i < prevcount; i++) -- mach_port_deallocate(my_task, prev_list[i]); -- -- vm_deallocate(my_task, (vm_address_t)prev_list, sizeof(thread_t) * prevcount); -- } -- -- prev_list = act_list; -- prevcount = listcount; -- } -- } while (changes); -- -- for(i = 0; i < listcount; i++) -- mach_port_deallocate(my_task, act_list[i]); -- -- vm_deallocate(my_task, (vm_address_t)act_list, sizeof(thread_t) * listcount); -- -- -+ /* Loop stopping threads until you have gone over the whole list -+ twice without a new one appearing. thread_create() won't -+ return (and thus the thread stop) until the new thread -+ exists, so there is no window whereby you could stop a -+ thread, recognise it is stopped, but then have a new thread -+ it created before stopping show up later. -+ */ -+ -+ changes = 1; -+ prev_list = NULL; -+ prevcount = 0; -+ do { -+ int result; -+ kern_result = task_threads(my_task, &act_list, &listcount); -+ -+ if(kern_result == KERN_SUCCESS) { -+ result = GC_suspend_thread_list(act_list, listcount, prev_list, -+ prevcount); -+ changes = result; -+ -+ if(prev_list != NULL) { -+ for(i = 0; i < prevcount; i++) -+ mach_port_deallocate(my_task, prev_list[i]); -+ -+ vm_deallocate(my_task, (vm_address_t)prev_list, -+ sizeof(thread_t) * prevcount); -+ } -+ prev_list = act_list; -+ prevcount = listcount; -+ } -+ } while (changes); -+ GC_ASSERT(prev_list != 0); -+ for(i = 0; i < prevcount; i++) -+ mach_port_deallocate(my_task, prev_list[i]); -+ -+ vm_deallocate(my_task, (vm_address_t)act_list, -+ sizeof(thread_t) * listcount); -+ - # ifdef MPROTECT_VDB - if(GC_incremental) { -- extern void GC_mprotect_stop(); -- GC_mprotect_stop(); -+ extern void GC_mprotect_stop(); -+ GC_mprotect_stop(); - } - # endif -- -+ - # ifdef PARALLEL_MARK - GC_release_mark_lock(); - # endif -- #if DEBUG_THREADS -- GC_printf1("World stopped from 0x%lx\n", my_thread); -- #endif -- -- mach_port_deallocate(my_task, my_thread); -+# if DEBUG_THREADS -+ GC_printf("World stopped from 0x%lx\n", (unsigned long)my_thread); -+# endif -+ -+ mach_port_deallocate(my_task, my_thread); - } - - /* Caller holds allocation lock, and has held it continuously since */ -@@ -569,65 +529,69 @@ - { - task_t my_task = current_task(); - mach_port_t my_thread = mach_thread_self(); -- int i, j; -- GC_thread p; -+ unsigned int i; -+ int j; - kern_return_t kern_result; - thread_act_array_t act_list; - mach_msg_type_number_t listcount; - struct thread_basic_info info; - mach_msg_type_number_t outCount = THREAD_INFO_MAX; -- -+ - # if DEBUG_THREADS -- GC_printf0("World starting\n"); -+ GC_printf("World starting\n"); - # endif - - # ifdef MPROTECT_VDB - if(GC_incremental) { -- extern void GC_mprotect_resume(); -- GC_mprotect_resume(); -+ extern void GC_mprotect_resume(); -+ GC_mprotect_resume(); - } - # endif - - kern_result = task_threads(my_task, &act_list, &listcount); - for(i = 0; i < listcount; i++) { - thread_act_t thread = act_list[i]; -- if (thread != my_thread && -- (!GC_use_mach_handler_thread || -- (GC_use_mach_handler_thread && GC_mach_handler_thread != thread))) { -+ if (thread != my_thread -+ && (!GC_use_mach_handler_thread -+ || (GC_use_mach_handler_thread -+ && GC_mach_handler_thread != thread))) { - for(j = 0; j < GC_mach_threads_count; j++) { - if (thread == GC_mach_threads[j].thread) { - if (GC_mach_threads[j].already_suspended) { - # if DEBUG_THREADS -- GC_printf1("Not resuming already suspended thread %p\n", thread); -+ GC_printf("Not resuming already suspended thread %p\n", thread); - # endif - continue; - } - kern_result = thread_info(thread, THREAD_BASIC_INFO, - (thread_info_t)&info, &outCount); -- if(kern_result != KERN_SUCCESS) continue; -+ if(kern_result != KERN_SUCCESS) -+ ABORT("thread_info failed"); - # if DEBUG_THREADS -- GC_printf2("Thread state for 0x%lx = %d\n", thread, -+ GC_printf("Thread state for 0x%lx = %d\n", (unsigned long)thread, - info.run_state); -- GC_printf1("Resuming 0x%lx\n", thread); -+ GC_printf("Resuming 0x%lx\n", (unsigned long)thread); - # endif - /* Resume the thread */ - kern_result = thread_resume(thread); -- if(kern_result != KERN_SUCCESS) continue; -- } -+ if(kern_result != KERN_SUCCESS) -+ ABORT("thread_resume failed"); -+ } - } - } -- -- mach_port_deallocate(my_task, thread); -+ mach_port_deallocate(my_task, thread); - } -- vm_deallocate(my_task, (vm_address_t)act_list, sizeof(thread_t) * listcount); -- -- mach_port_deallocate(my_task, my_thread); -+ vm_deallocate(my_task, (vm_address_t)act_list, -+ sizeof(thread_t) * listcount); -+ -+ mach_port_deallocate(my_task, my_thread); - # if DEBUG_THREADS -- GC_printf0("World started\n"); -+ GC_printf("World started\n"); - # endif - } - --void GC_darwin_register_mach_handler_thread(mach_port_t thread) { -+void GC_darwin_register_mach_handler_thread(mach_port_t thread) -+{ - GC_mach_handler_thread = thread; - GC_use_mach_handler_thread = 1; - } -diff -uNr mono-1.2.6/libgc/include/private/gc_priv.h mono-1.2.6-new/libgc/include/private/gc_priv.h ---- mono-1.2.6/libgc/include/private/gc_priv.h 2007-11-08 17:06:58.000000000 -0500 -+++ mono-1.2.6-new/libgc/include/private/gc_priv.h 2007-11-29 17:38:39.000000000 -0500 -@@ -367,6 +367,54 @@ - # endif - - #if defined(DARWIN) -+# if defined(POWERPC) -+# if CPP_WORDSZ == 32 -+# define GC_THREAD_STATE_T ppc_thread_state_t -+# define GC_MACH_THREAD_STATE PPC_THREAD_STATE -+# define GC_MACH_THREAD_STATE_COUNT PPC_THREAD_STATE_COUNT -+# define GC_MACH_HEADER mach_header -+# define GC_MACH_SECTION section -+# else -+# define GC_THREAD_STATE_T ppc_thread_state64_t -+# define GC_MACH_THREAD_STATE PPC_THREAD_STATE64 -+# define GC_MACH_THREAD_STATE_COUNT PPC_THREAD_STATE64_COUNT -+# define GC_MACH_HEADER mach_header_64 -+# define GC_MACH_SECTION section_64 -+# endif -+# elif defined(I386) || defined(X86_64) -+# if CPP_WORDSZ == 32 -+# define GC_THREAD_STATE_T x86_thread_state32_t -+# define GC_MACH_THREAD_STATE x86_THREAD_STATE32 -+# define GC_MACH_THREAD_STATE_COUNT x86_THREAD_STATE32_COUNT -+# define GC_MACH_HEADER mach_header -+# define GC_MACH_SECTION section -+# else -+# define GC_THREAD_STATE_T x86_thread_state64_t -+# define GC_MACH_THREAD_STATE x86_THREAD_STATE64 -+# define GC_MACH_THREAD_STATE_COUNT x86_THREAD_STATE64_COUNT -+# define GC_MACH_HEADER mach_header_64 -+# define GC_MACH_SECTION section_64 -+# endif -+# else -+# error define GC_THREAD_STATE_T -+# define GC_MACH_THREAD_STATE MACHINE_THREAD_STATE -+# define GC_MACH_THREAD_STATE_COUNT MACHINE_THREAD_STATE_COUNT -+# endif -+/* Try to work out the right way to access thread state structure members. -+ The structure has changed its definition in different Darwin versions. -+ This now defaults to the (older) names without __, thus hopefully, -+ not breaking any existing Makefile.direct builds. */ -+# if defined (HAS_PPC_THREAD_STATE___R0) \ -+ || defined (HAS_PPC_THREAD_STATE64___R0) \ -+ || defined (HAS_X86_THREAD_STATE32___EAX) \ -+ || defined (HAS_X86_THREAD_STATE64___RAX) -+# define THREAD_FLD(x) __ ## x -+# else -+# define THREAD_FLD(x) x -+# endif -+#endif -+ -+#if defined(DARWIN) - # if defined(POWERPC) - # define GC_MACH_THREAD_STATE_FLAVOR PPC_THREAD_STATE - # elif defined(I386) diff -uNr mono-1.2.6/mono/metadata/loader.c mono-1.2.6-new/mono/metadata/loader.c --- mono-1.2.6/mono/metadata/loader.c 2007-11-08 17:07:19.000000000 -0500 +++ mono-1.2.6-new/mono/metadata/loader.c 2007-11-29 16:22:08.000000000 -0500 Modified: trunk/experimental/common/main/finkinfo/libs/cocoa-sharp.info URL: http://svn.finkproject.org/websvn/diff.php?path=/trunk/experimental/common/main/finkinfo/libs/cocoa-sharp.info&rev=1087&repname=user%3a+ranger ============================================================================== --- trunk/experimental/common/main/finkinfo/libs/cocoa-sharp.info (original) +++ trunk/experimental/common/main/finkinfo/libs/cocoa-sharp.info Thu Dec 13 18:23:15 2007 @@ -9,7 +9,7 @@ libicu31-dev, libicu32-dev, mono-dev (>= 1.2.6-1), - monodoc (>= 1.1.18-1), + monodoc (>= 1.2.6-1), pkgconfig << Depends: << Modified: trunk/experimental/common/main/finkinfo/libs/dbus-sharp.info URL: http://svn.finkproject.org/websvn/diff.php?path=/trunk/experimental/common/main/finkinfo/libs/dbus-sharp.info&rev=1087&repname=user%3a+ranger ============================================================================== --- trunk/experimental/common/main/finkinfo/libs/dbus-sharp.info (original) +++ trunk/experimental/common/main/finkinfo/libs/dbus-sharp.info Thu Dec 13 18:23:15 2007 @@ -19,8 +19,8 @@ libpixman1 (>= 0.1.5-1), libpng3, mono-dev (>= 1.2.6-1), - mono-tools, - monodoc, + mono-tools (>= 1.2.6-1), + monodoc (>= 1.2.6-1), pkgconfig (>= 0.21-1), system-java14-dev, x11-dev Modified: trunk/experimental/copy-mono.sh URL: http://svn.finkproject.org/websvn/diff.php?path=/trunk/experimental/copy-mono.sh&rev=1087&repname=user%3a+ranger ============================================================================== --- trunk/experimental/copy-mono.sh (original) +++ trunk/experimental/copy-mono.sh Thu Dec 13 18:23:15 2007 @@ -2,23 +2,16 @@ for FILE in \ common/crypto/finkinfo/boo.* \ - common/crypto/finkinfo/gecko-sharp.* \ - common/crypto/finkinfo/gecko-sharp1.* \ - common/crypto/finkinfo/gnome-sharp2.* \ - common/crypto/finkinfo/gtk-sharp-monodoc.* \ - common/crypto/finkinfo/gtk-sharp.* \ - common/crypto/finkinfo/gtk-sharp2.* \ - common/crypto/finkinfo/gtksourceview-sharp.* \ + common/crypto/finkinfo/*-sharp* \ + common/crypto/finkinfo/gtk* \ common/crypto/finkinfo/libgdiplus.* \ - common/crypto/finkinfo/mono-tools.* \ - common/crypto/finkinfo/monodevelop.* \ + common/crypto/finkinfo/mono* \ common/main/finkinfo/devel/nant.* \ common/main/finkinfo/languages/mono.* \ common/main/finkinfo/languages/ikvm.* \ - common/main/finkinfo/libs/cocoa-sharp.* \ - common/main/finkinfo/libs/dbus-sharp.* \ - common/main/finkinfo/utils/monodoc.* \ - common/main/finkinfo/web/mono-xsp.* \ + common/main/finkinfo/libs/*-sharp* \ + common/main/finkinfo/utils/mono* \ + common/main/finkinfo/web/mono* \ ; do ./tounstable.pl --prefix=/pc "$FILE" done ------------------------------------------------------------------------- SF.Net email is sponsored by: Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace _______________________________________________ Fink-commits mailing list Fink-commits@lists.sourceforge.net http://news.gmane.org/gmane.os.apple.fink.cvs