summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorIvan Maidanski <ivmai@mail.ru>2012-01-26 06:16:10 +0100
committerIvan Maidanski <ivmai@mail.ru>2012-01-26 17:49:52 +0100
commit145af1505392a502af230c1324b5e7afab8f6ccb (patch)
treedf624aebd0b07f39f8502ebfee4cf2d449ed747e /include
parenta16036324480dfae2b094f0fa6567db1b867c617 (diff)
Fix gcconfig.h to define USE_GET_STACKBASE_FOR_MAIN for Android
(causing pthread_attr_getstack to be used to get main stack base even in single-threaded mode instead of GC_linux_main_stack_base) * include/private/gcconfig.h (USE_GET_STACKBASE_FOR_MAIN): Define if PLATFORM_ANDROID.
Diffstat (limited to 'include')
-rw-r--r--include/private/gcconfig.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/include/private/gcconfig.h b/include/private/gcconfig.h
index cd019eb..0b8bc74 100644
--- a/include/private/gcconfig.h
+++ b/include/private/gcconfig.h
@@ -2339,6 +2339,14 @@
# define DATAEND (ptr_t)(end)
#endif
+#if defined(PLATFORM_ANDROID) && !defined(THREADS) \
+ && !defined(USE_GET_STACKBASE_FOR_MAIN)
+ /* Always use pthread_attr_getstack on Android ("-lpthread" option is */
+ /* not needed to be specified manually) since GC_linux_main_stack_base */
+ /* causes app crash if invoked inside Dalvik VM. */
+# define USE_GET_STACKBASE_FOR_MAIN
+#endif
+
#if (defined(SVR4) || defined(PLATFORM_ANDROID)) && !defined(GETPAGESIZE)
# include <unistd.h>
# define GETPAGESIZE() sysconf(_SC_PAGESIZE)