Skip to content

Commit

Permalink
2010-03-12 Ivan Maidanski <ivmai@mail.ru>
Browse files Browse the repository at this point in the history
	* doc/README.macros (USE_GET_STACKBASE_FOR_MAIN): Document.
	* os_dep.c (GC_get_main_stack_base): Recognize
	USE_GET_STACKBASE_FOR_MAIN (only if THREADS and LINUX_STACKBOTTOM)
	and use GC_get_stack_base() in this case.
  • Loading branch information
ivmai authored and ivmai committed Jul 26, 2011
1 parent a0252d6 commit 90ca8ad
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 0 deletions.
7 changes: 7 additions & 0 deletions ChangeLog
@@ -1,3 +1,10 @@
2010-03-12 Ivan Maidanski <ivmai@mail.ru>

* doc/README.macros (USE_GET_STACKBASE_FOR_MAIN): Document.
* os_dep.c (GC_get_main_stack_base): Recognize
USE_GET_STACKBASE_FOR_MAIN (only if THREADS and LINUX_STACKBOTTOM)
and use GC_get_stack_base() in this case.

2010-03-05 Ivan Maidanski <ivmai@mail.ru> (really Burkhard Linke)

* os_dep.c (GC_get_stack_base): Add LOCK/UNLOCK() (since
Expand Down
4 changes: 4 additions & 0 deletions doc/README.macros
Expand Up @@ -511,3 +511,7 @@ UNICODE (Win32 only) Use the Unicode variant ('W') of the Win32 API instead
of ANSI/ASCII one ('A'). Useful for WinCE.

PLATFORM_ANDROID Compile for Android NDK platform.

USE_GET_STACKBASE_FOR_MAIN (Linux only) Use pthread_attr_getstack() instead
of __libc_stack_end for getting the primordial thread stack base (useful if
the client modifies the program's address space).
7 changes: 7 additions & 0 deletions os_dep.c
Expand Up @@ -1163,6 +1163,13 @@ ptr_t GC_get_main_stack_base(void)
# endif
# endif /* HEURISTIC1 */
# ifdef LINUX_STACKBOTTOM
# if defined(THREADS) && defined(USE_GET_STACKBASE_FOR_MAIN)
{
struct GC_stack_base sb;
if (GC_get_stack_base(&sb) == GC_SUCCESS)
return (ptr_t)sb.mem_base;
}
# endif
result = GC_linux_stack_base();
# endif
# ifdef FREEBSD_STACKBOTTOM
Expand Down

0 comments on commit 90ca8ad

Please sign in to comment.