summaryrefslogtreecommitdiff
path: root/os_dep.c
diff options
context:
space:
mode:
authorivmai <ivmai>2011-04-16 11:32:15 +0200
committerIvan Maidanski <ivmai@mail.ru>2011-07-26 19:06:57 +0200
commit5525068dbc6e9707f5bc703825bf1cfb76eeeb5f (patch)
treede063cc9a258afbb18448db842aa79f577f07336 /os_dep.c
parentbf30b158adebe5ee2d5a5610ec8e60001317fd45 (diff)
2011-04-16 Ivan Maidanski <ivmai@mail.ru>
* os_dep.c (GC_get_main_stack_base): Try to use pthread_attr_getstack first for Linux if THREADS. * doc/README.macros (USE_GET_STACKBASE_FOR_MAIN): Adjust text alignment.
Diffstat (limited to 'os_dep.c')
-rw-r--r--os_dep.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/os_dep.c b/os_dep.c
index 61ce2e2..b67e00e 100644
--- a/os_dep.c
+++ b/os_dep.c
@@ -1156,7 +1156,8 @@ GC_INNER word GC_page_size = 0;
ptr_t GC_get_main_stack_base(void)
{
ptr_t result; /* also used as "dummy" to get the approx. sp value */
-# if defined(LINUX) && defined(USE_GET_STACKBASE_FOR_MAIN) && !defined(NACL)
+# if defined(LINUX) && !defined(NACL) \
+ && (defined(USE_GET_STACKBASE_FOR_MAIN) || defined(THREADS))
pthread_attr_t attr;
void *stackaddr;
size_t size;
@@ -1221,8 +1222,7 @@ GC_INNER word GC_page_size = 0;
}
#endif /* !AMIGA, !BEOS, !OPENBSD, !OS2, !Windows */
-#if defined(GC_LINUX_THREADS) && !defined(HAVE_GET_STACK_BASE) \
- && !defined(NACL)
+#if defined(GC_LINUX_THREADS) && !defined(NACL)
# include <pthread.h>
/* extern int pthread_getattr_np(pthread_t, pthread_attr_t *); */