Commit Graph

27 Commits

Author SHA1 Message Date
Keith Seitz 494d64aff6 gc.h (GC_is_thread_suspended): Declare.
* include/gc.h (GC_is_thread_suspended): Declare.
        * pthread_stop_world.c (GC_is_thread_suspended): New function.

From-SVN: r124081
2007-04-23 21:10:09 +00:00
Alexandre Oliva 18fa3240db ffi.h.in (ffi_closure_alloc, [...]): New.
libffi/ChangeLog:
* include/ffi.h.in (ffi_closure_alloc, ffi_closure_free): New.
(ffi_prep_closure_loc): New.
(ffi_prep_raw_closure_loc): New.
(ffi_prep_java_raw_closure_loc): New.
* src/closures.c: New file.
* src/dlmalloc.c [FFI_MMAP_EXEC_WRIT] (struct malloc_segment):
Replace sflags with exec_offset.
[FFI_MMAP_EXEC_WRIT] (mmap_exec_offset, add_segment_exec_offset,
sub_segment_exec_offset): New macros.
(get_segment_flags, set_segment_flags, check_segment_merge): New
macros.
(is_mmapped_segment, is_extern_segment): Use get_segment_flags.
(add_segment, sys_alloc, create_mspace, create_mspace_with_base,
destroy_mspace): Use new macros.
(sys_alloc): Silence warning.
* Makefile.am (libffi_la_SOURCES): Add src/closures.c.
* Makefile.in: Rebuilt.
* src/prep_cif [FFI_CLOSURES] (ffi_prep_closure): Implement in
terms of ffi_prep_closure_loc.
* src/raw_api.c (ffi_prep_raw_closure_loc): Renamed and adjusted
from...
(ffi_prep_raw_closure): ... this.  Re-implement in terms of the
renamed version.
* src/java_raw_api (ffi_prep_java_raw_closure_loc): Renamed and
adjusted from...
(ffi_prep_java_raw_closure): ... this.  Re-implement in terms of
the renamed version.
* src/alpha/ffi.c (ffi_prep_closure_loc): Renamed from
(ffi_prep_closure): ... this.
* src/pa/ffi.c: Likewise.
* src/cris/ffi.c: Likewise.  Adjust.
* src/frv/ffi.c: Likewise.
* src/ia64/ffi.c: Likewise.
* src/mips/ffi.c: Likewise.
* src/powerpc/ffi_darwin.c: Likewise.
* src/s390/ffi.c: Likewise.
* src/sh/ffi.c: Likewise.
* src/sh64/ffi.c: Likewise.
* src/sparc/ffi.c: Likewise.
* src/x86/ffi64.c: Likewise.
* src/x86/ffi.c: Likewise.
(FFI_INIT_TRAMPOLINE): Adjust.
(ffi_prep_raw_closure_loc): Renamed and adjusted from...
(ffi_prep_raw_closure): ... this.
* src/powerpc/ffi.c (ffi_prep_closure_loc): Renamed from
(ffi_prep_closure): ... this.
(flush_icache): Adjust.
boehm-gc/ChangeLog:
* include/gc.h (GC_REGISTER_FINALIZER_UNREACHABLE): New.
(GC_register_finalizer_unreachable): Declare.
(GC_debug_register_finalizer_unreachable): Declare.
* finalize.c (GC_unreachable_finalize_mark_proc): New.
(GC_register_finalizer_unreachable): New.
(GC_finalize): Handle it.
* dbg_mlc.c (GC_debug_register_finalizer_unreachable): New.
(GC_debug_register_finalizer_no_order): Fix whitespace.
libjava/ChangeLog:
* include/jvm.h (_Jv_ClosureListFinalizer): New.
(_Jv_Linker::create_error_method): Adjust.
* boehm.cc (_Jv_ClosureListFinalizer): New.
* nogc.cc (_Jv_ClosureListFinalizer): New.
* java/lang/Class.h (class _Jv_ClosureList): New.
(class java::lang::Class): Declare it as friend.
* java/lang/natClass.cc (_Jv_ClosureList::releaseClosures): New.
(_Jv_ClosureList::registerClousure): New.
* include/execution.h (_Jv_ExecutionEngine): Add get_closure_list.
(_Jv_CompiledEngine::do_get_closure_list): New.
(_Jv_CompiledEngine::_Jv_CompiledEngine): Use it.
(_Jv_IndirectCompiledClass): Add closures.
(_Jv_IndirectCompiledEngine::get_aux_info): New.
(_Jv_IndirectCompiledEngine::do_allocate_field_initializers): Use
it.
(_Jv_IndirectCompiledEngine::do_get_closure_list): New.
(_Jv_IndirectCompiledEngine::_Jv_IndirectCompiledEngine): Use it.
(_Jv_InterpreterEngine::do_get_closure_list): Declare.
(_Jv_InterpreterEngine::_Jv_InterpreterEngine): Use it.
* interpret.cc (FFI_PREP_RAW_CLOSURE): Use _loc variants.
(node_closure): Add closure list.
(_Jv_InterpMethod::ncode): Add jclass argument.  Use
ffi_closure_alloc and the separate code pointer.  Register the
closure for finalization.
(_Jv_JNIMethod::ncode): Likewise.
(_Jv_InterpreterEngine::do_create_ncode): Pass klass to ncode.
(_Jv_InterpreterEngine::do_get_closure_list): New.
* include/java-interp.h (_Jv_InterpMethod::ncode): Adjust.
(_Jv_InterpClass): Add closures field.
(_Jv_JNIMethod::ncode): Adjust.
* defineclass.cc (_Jv_ClassReader::handleCodeAttribute): Adjust.
(_Jv_ClassReader::handleMethodsEnd): Likewise.
* link.cc (struct method_closure): Add closure list.
(_Jv_Linker::create_error_method): Add jclass argument.  Use
ffi_closure_alloc and the separate code pointer.  Register the
closure for finalization.
(_Jv_Linker::link_symbol_table): Remove outdated comment about
sharing of otable and atable.  Adjust.
* java/lang/reflect/natVMProxy.cc (ncode_closure): Add closure
list.
(ncode): Add jclass argument.  Use ffi_closure_alloc and the
separate code pointer.  Register the closure for finalization.
(java::lang::reflect::VMProxy::generateProxyClass): Adjust.
* testsuite/libjava.jar/TestClosureGC.java: New.
* testsuite/libjava.jar/TestClosureGC.out: New.
* testsuite/libjava.jar/TestClosureGC.xfail: New.
* testsuite/libjava.jar/TestClosureGC.jar: New.

From-SVN: r122652
2007-03-07 07:27:25 +00:00
Petr Salinger eb496303d7 configure.ac: add support for GNU/kFreeBSD, accepted by upstream for gc 6.8.
2006-06-07  Petr Salinger  <Petr.Salinger@seznam.cz>

	* configure.ac: add support for GNU/kFreeBSD, accepted by upstream
	for gc 6.8.
	* dyn_load.c: Likewise.
	* include/gc.h: Likewise.
	* private/gcconfig.h: Likewise.
	* configure: Regenerate.
	* include/gc_config.h.in: Regenerate.

From-SVN: r117033
2006-09-18 18:45:08 +00:00
Bryce McKinlay 7ddf92a874 re PR libgcj/13212 (JNI/CNI AttachCurrentThread does not register thread with garbage collector)
boehm-gc
	PR libgcj/13212:
	* configure.ac: Check for pthread_getattr_np(). Remove
	GC_PTHREAD_SYM_VERSION detection.
	* include/gc.h (GC_register_my_thread, GC_unregister_my_thread,
	GC_get_thread_stack_base): New declarations.
	* pthread_support.c (GC_register_my_thread, GC_unregister_my_thread,
	GC_get_thread_stack_base): New functions.
	(GC_delete_thread): Don't try to free the first_thread.
	* misc.c (GC_init_inner): Use GC_get_thread_stack_base() if possible.
	(pthread_create_, constr): Removed.
	(pthread_create): Don't rename.
	* include/gc_ext_config.h.in: Rebuilt.
	* include/gc_pthread_redirects.h (pthread_create): Define 
	unconditionally.
	* include/gc_config.h.in: Rebuilt.
	* configure: Rebuilt.
libjava
	* java/lang/natThread.cc (_Jv_AttachCurrentThread): Attach thread
	to GC.
	(_Jv_DetachCurrentThread): Detach thread from GC.
	* include/boehm-gc.h (_Jv_GCAttachThread, _Jv_GCDetachThread):
	Declare.
	* boehm.cc (_Jv_GCAttachThread): New function.
	(_Jv_GCDetachThread): Likewise.

From-SVN: r116313
2006-08-21 22:07:30 +00:00
Keith Seitz 7691d0d3c9 pthread_stop_world.c (GC_suspend_handler): Redirect to suspension routine if signal is received and thread is flagged...
* pthread_stop_world.c (GC_suspend_handler): Redirect to suspension
        routine if signal is received and thread is flagged SUSPENDED.
        (suspend_self): New function.
        (GC_suspend_thread): New function.
        (GC_resume_thread): New function.
        * include/gc.h (GC_suspend_thread): Declare.
        (GC_resumet_thread): Declare.
        * include/private/pthread_support.h (SUSPENDED): New GC_thread
        flag.

From-SVN: r114869
2006-06-21 20:56:37 +00:00
Andrew Haley 5204d06d82 dyn_load.c (GC_has_static_roots): Declare.
2006-03-07  Andrew Haley  <aph@redhat.com>

        * dyn_load.c (GC_has_static_roots): Declare.
        (GC_register_dynlib_callback): Call GC_has_static_roots.

From-SVN: r113223
2006-04-24 13:40:21 +00:00
Bryce McKinlay 54f28c21ee Import Boehm GC version 6.6.
From-SVN: r110204
2006-01-25 03:03:14 +00:00
David Ayers 8827ffce99 re PR libobjc/13946 (ObjC configured --with-objc-gc needs external Boehm gc)
2006-01-24  David Ayers  <d.ayers@inode.at>

	PR libobjc/13946
	* include/gc.h: Fix prototype declarations for bootstrap.

From-SVN: r110183
2006-01-24 22:00:26 +00:00
Bryce McKinlay 9a060b37a1 boehm-gc.h: Include gc_ext_config.h, not gc_config.h.
2005-01-01  Bryce McKinlay  <mckinlay@redhat.com>

	* include/boehm-gc.h: Include gc_ext_config.h, not gc_config.h.

2005-01-01  Bryce McKinlay  <mckinlay@redhat.com>

	* configure.ac (AC_CONFIG_HEADERS): Build both include/gc_config.h
	and include/gc_ext_config.h.
	* include/gc_ext_config.h: New file. Define only THREAD_LOCAL_ALLOC.
	* include/gc.h: Undef PACKAGE_* before including gc_config.h.

From-SVN: r92801
2005-01-02 03:35:57 +00:00
Bryce McKinlay c54d30fae2 re PR libgcj/18699 (SIGSEGV in GC_local_gcj_malloc)
2004-11-29  Bryce McKinlay  <mckinlay@redhat.com>

        PR libgcj/18699
        Revert patches of 2004-11-26 and 2004-11-27.

From-SVN: r91505
2004-11-30 00:38:57 +00:00
Bryce McKinlay 504832c13e Fix "PACKAGE_NAME redefined" errors.
2004-11-26  Bryce McKinlay  <mckinlay@redhat.com>

	Fix "PACKAGE_NAME redefined" errors.
	* configure.ac (AC_CONFIG_HEADERS): Build both include/config.h
	and include/gc_config.h.
	* configure: Regenerated.
	* include/gc_config.h.in: No longer auto-generated. Define only the
	macros needed by libjava.
	* include/config.h.in: Generated by autoheader.
	* include/gc.h: Include config.h, not gc_config.h.

From-SVN: r91330
2004-11-26 05:31:48 +00:00
Bryce McKinlay 4109fe8594 configure.in (GCINCS): Don't use "boehm-cflags".
libjava:
2004-08-13  Bryce McKinlay  <mckinlay@redhat.com>

	* configure.in (GCINCS): Don't use "boehm-cflags". Instead, -I
	boehm-gc's include dirs.
	* configure: Rebuilt.
	* include/boehm-gc.h: Include gc_config.h.

boehm-gc:
2004-08-13  Bryce McKinlay  <mckinlay@redhat.com>

	* configure.ac (gc_cflags): Add -Iinclude.
	(AC_CONFIG_HEADERS): New. Configure gc_config.h header.
	Don't write DEFS to boehm-cflags file.
	* configure: Rebuilt.
	* gcj_mlc.c: Check #ifdef GC_GCJ_SUPPORT after including headers.
	* specific.c: Check #ifdef GC_LINUX_THREADS after including headers.
	* include/gc_config_macros.h: Remove backward-compatibility
	redefinitions of GC_ names.
	* include/gc.h: Include <gc_config.h>.

2004-08-13  Bryce McKinlay  <mckinlay@redhat.com>

	Import Boehm GC version 6.3.

From-SVN: r85972
2004-08-14 00:05:36 +01:00
Danny Smith 822ed7f806 gc.h (GC_CreateThread): Declare with WINAPI attribute.
* include/gc.h (GC_CreateThread): Declare with WINAPI
	attribute.
	* win32_threads.c (GC_CreateThread): Make definitions consistent
	with declaration.  Cast &thread_table[i].handle to PHANDLE
	in call to DuplicateHandle
	(thread_start): Declare as static.

From-SVN: r69990
2003-07-31 04:52:36 +00:00
Jeff Sturm 30c3de1ffb Import GC 6.3alpha1.
* BCC_MAKEFILE: Merge with GC 6.3alpha1 release.
	* ChangeLog: Likewise.
	* Makefile.am: Likewise.
	* Makefile.direct: Likewise.
	* Makefile.dj: Likewise.
	* allchblk.c: Likewise.
	* alloc.c: Likewise.
	* backgraph.c: Likewise.
	* configure.host: Likewise.
	* configure.in: Likewise.
	* dbg_mlc.c: Likewise.
	* dyn_load.c: Likewise.
	* finalize.c: Likewise.
	* gc_cpp.cc: Likewise.
	* gc_dlopen.c: Likewise.
	* gcj_mlc.c: Likewise.
	* if_mach.c: Likewise.
	* mach_dep.c: Likewise.
	* malloc.c: Likewise.
	* mallocx.c: Likewise.
	* mark.c: Likewise.
	* mark_rts.c: Likewise.
	* misc.c: Likewise.
	* os_dep.c: Likewise.
	* ptr_chck.c: Likewise.
	* reclaim.c: Likewise.
	* solaris_pthreads.c: Likewise.
	* solaris_threads.c: Likewise.
	* sparc_mach_dep.S: Likewise.
	* threadlibs.c: Likewise.
	* typd_mlc.c: Likewise.
	* version.h: Likewise.
	* win32_threads.c: Likewise.
	* Mac_files/MacOS_Test_config.h: Likewise.
	* Mac_files/MacOS_config.h: Likewise.
	* cord/cordbscs.c: Likewise.
	* cord/cordprnt.c: Likewise.
	* cord/de_win.c: Likewise.
	* doc/README: Likewise.
	* doc/README.MacOSX: Likewise.
	* doc/README.changes: Likewise.
	* doc/README.environment: Likewise.
	* doc/README.ews4800: Likewise.
	* doc/README.linux: Likewise.
	* doc/README.macros: Likewise.
	* doc/README.win32: Likewise.
	* doc/debugging.html: Likewise.
	* doc/gcdescr.html: Likewise.
	* doc/tree.html: Likewise.
	* include/Makefile.in: Likewise.
	* include/gc.h: Likewise.
	* include/gc_cpp.h: Likewise.
	* include/gc_local_alloc.h: Likewise.
	* include/gc_mark.h: Likewise.
	* include/gc_pthread_redirects.h: Likewise.
	* include/gc_typed.h: Likewise.
	* include/new_gc_alloc.h: Likewise.
	* include/private/dbg_mlc.h: Likewise.
	* include/private/gc_hdrs.h: Likewise.
	* include/private/gc_locks.h: Likewise.
	* include/private/gc_pmark.h: Likewise.
	* include/private/gc_priv.h: Likewise.
	* include/private/gcconfig.h: Likewise.
	* include/private/solaris_threads.h: Likewise.
	* include/private/specific.h: Likewise.
	* tests/test.c: Likewise.
	* tests/test_cpp.cc: Likewise.

	* configure: Rebuild.
	* Makefile.in: Rebuild.

	* mips_sgi_mach_dep.s: Add.

	* alpha_mach_dep.s: Remove.
	* irix_threads.c: Remove.
	* linux_threads.c: Remove.
	* mips_sgi_mach_dep.S: Remove.
	* missing: Remove.
	* powerpc_macosx_mach_dep.s: Remove.
	* doc/Makefile.am: Remove.
	* doc/Makefile.in: Remove.

From-SVN: r69880
2003-07-28 04:18:23 +00:00
Bryce McKinlay 79f777fd1e Imported GC 6.1 Alpha 3. Finally.
From-SVN: r49698
2002-02-12 04:37:57 +00:00
Adam Megacz b1d246853d gc.h: (GC_CreateThread) This function is now exposed on all Win32 platforms.
2002-02-06  Adam Megacz <adam@xwt.org>

        * boehm-gc/include/gc.h: (GC_CreateThread) This function is
        now exposed on all Win32 platforms.
        * boehm-gc/win32_threads.c: (GC_CreateThread) This now
        compiles on Win32; it invokes CreateThread() if GC is built
        as a DLL; otherwise it registers the thread.
        * boehm-gc/misc.c (GC_init): Initialize GC_allocate_ml in case
        libgcjgc was not built as a DLL.

From-SVN: r49563
2002-02-07 03:56:40 +00:00
Adam Megacz 7e57448e82 2002-02-01 Adam Megacz <adam@xwt.org>
* boehm-gc on win32 now automatically detects if it is being built
	as a DLL; see http://gcc.gnu.org/ml/java/2001-12/msg00240.html

From-SVN: r49426
2002-02-02 04:23:13 +00:00
David Edelsohn 6cb3421f1f gc.h (GC_INIT): Add DATASTART and DATAEND roots on AIX.
* include/gc.h (GC_INIT): Add DATASTART and DATAEND roots on AIX.
	* include/private/gcconfig.h (RS6000): Add 64-bit AIX support.
	Define USE_GENERIC_PUSH_REGS.  Use AIX _data and _end symbols for
	DATASTART and DATAEND roots.
	* rs6000_mach_dep.s: Add function descriptor and traceback table.

From-SVN: r49218
2002-01-25 13:06:24 -05:00
Bryce McKinlay aeb76991de linux_threads.c (GC_init_parallel): Do not declare as a static constructor.
* linux_threads.c (GC_init_parallel): Do not declare as a static
	constructor.
	* include/gc.h (GC_init): Declare here. Add description.
	* include/private/gc_priv.h (GC_init): Remove declaration.

From-SVN: r46420
2001-10-23 01:28:56 +01:00
Bryce McKinlay 4c7726b172 Makefile.am, [...]: Imported GC 6.1 Alpha 1 and merged local changes.
* Makefile.am, acinclude.m4, configure.in: Imported GC 6.1 Alpha 1
	and merged local changes.

From-SVN: r46283
2001-10-16 10:01:40 +01:00
Tom Tromey 5a2586cf8f Makefile.am, [...]: Imported GC 6.0 and merged local changes.
* Makefile.am, acinclude.m4, configure.in: Imported GC 6.0 and
	merged local changes.

From-SVN: r44994
2001-08-18 01:04:43 +00:00
Bryce McKinlay abdbd4a8ec This commit was generated by cvs2svn to compensate for changes in r42373,
which included commits to RCS files with non-trunk default branches.

From-SVN: r42374
2001-05-21 07:39:25 +01:00
Bryce McKinlay 2caa2a6997 This commit was generated by cvs2svn to compensate for changes in r34605,
which included commits to RCS files with non-trunk default branches.

From-SVN: r34606
2000-06-20 00:42:00 +01:00
Bryce McKinlay 56293c2be2 This commit was generated by cvs2svn to compensate for changes in r33244,
which included commits to RCS files with non-trunk default branches.

From-SVN: r33245
2000-04-19 03:29:16 +01:00
Tom Tromey 85f29b3bb5 This commit was generated by cvs2svn to compensate for changes in r30327,
which included commits to RCS files with non-trunk default branches.

From-SVN: r30328
1999-11-01 20:48:52 +00:00
Tom Tromey 56ba54b4c0 This commit was generated by cvs2svn to compensate for changes in r27853,
which included commits to RCS files with non-trunk default branches.

From-SVN: r27854
1999-06-30 13:05:33 +00:00
Tom Tromey 73ffefd017 Initial revision
From-SVN: r26246
1999-04-07 08:01:30 +00:00