re PR libgcj/23367 (_Jv_FindMethodInCache is not thread-safe)
PR libgcj/23367: * include/jvm.h (_Jv_FreeMethodCache): Declare. * java/lang/natClass.cc (MCACHE_SIZE): Conditional on HAVE_TLS. (struct _Jv_mcache): Likewise. (method_cache): Likewise. (_Jv_FindMethodInCache): Do nothing unless TLS is available. (_Jv_AddMethodToCache): Likewise. (_Jv_FreeMethodCache): New function. * java/lang/natThread.cc (finish_): Call _Jv_FreeMethodCache. * aclocal.m4, configure, include/config.h.in: Rebuilt. * configure.ac: Invoke GCC_CHECK_TLS. From-SVN: r104707
This commit is contained in:
@@ -43,6 +43,7 @@ DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
|
||||
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||
am__aclocal_m4_deps = $(top_srcdir)/../config/acx.m4 \
|
||||
$(top_srcdir)/../config/depstand.m4 \
|
||||
$(top_srcdir)/../config/enable.m4 \
|
||||
$(top_srcdir)/../config/gxx-include-dir.m4 \
|
||||
$(top_srcdir)/../config/iconv.m4 \
|
||||
$(top_srcdir)/../config/lcmessage.m4 \
|
||||
@@ -51,9 +52,9 @@ am__aclocal_m4_deps = $(top_srcdir)/../config/acx.m4 \
|
||||
$(top_srcdir)/../config/lib-link.m4 \
|
||||
$(top_srcdir)/../config/lib-prefix.m4 \
|
||||
$(top_srcdir)/../config/no-executables.m4 \
|
||||
$(top_srcdir)/../libtool.m4 $(top_srcdir)/mingwld.m4 \
|
||||
$(top_srcdir)/pkg.m4 $(top_srcdir)/shlibpath.m4 \
|
||||
$(top_srcdir)/configure.ac
|
||||
$(top_srcdir)/../config/tls.m4 $(top_srcdir)/../libtool.m4 \
|
||||
$(top_srcdir)/mingwld.m4 $(top_srcdir)/pkg.m4 \
|
||||
$(top_srcdir)/shlibpath.m4 $(top_srcdir)/configure.ac
|
||||
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
|
||||
$(ACLOCAL_M4)
|
||||
CONFIG_HEADER = config.h $(top_builddir)/gcj/libgcj-config.h
|
||||
|
||||
@@ -319,6 +319,9 @@
|
||||
/* Define if global 'timezone' exists. */
|
||||
#undef HAVE_TIMEZONE
|
||||
|
||||
/* Define to 1 if the target supports thread-local storage. */
|
||||
#undef HAVE_TLS
|
||||
|
||||
/* Define to 1 if your `struct tm' has `tm_zone'. Deprecated, use
|
||||
`HAVE_STRUCT_TM_TM_ZONE' instead. */
|
||||
#undef HAVE_TM_ZONE
|
||||
|
||||
@@ -359,6 +359,10 @@ void _Jv_SetInitialHeapSize (const char *arg);
|
||||
_Jv_GCSetMaximumHeapSize. */
|
||||
void _Jv_SetMaximumHeapSize (const char *arg);
|
||||
|
||||
/* Free the method cache, if one was allocated. This is only called
|
||||
during thread deregistration. */
|
||||
void _Jv_FreeMethodCache ();
|
||||
|
||||
extern "C" void JvRunMain (jclass klass, int argc, const char **argv);
|
||||
void _Jv_RunMain (jclass klass, const char *name, int argc, const char **argv,
|
||||
bool is_jar);
|
||||
|
||||
Reference in New Issue
Block a user