libgo patch committed: Test USING_SPLIT_STACK using #ifdef, not #if
Ian Lance Taylor
iant@golang.org
Sat Jun 23 02:44:00 GMT 2018
This patch by Cherry Zhang fixes the libgo runtime code to
consistently use #ifdef instead of #if for USING_SPLIT_STACK.
Bootstrapped and ran Go testsuite on x86_64-pc-linux-gnu. Committed
to mainline.
Ian
-------------- next part --------------
Index: gcc/go/gofrontend/MERGE
===================================================================
--- gcc/go/gofrontend/MERGE (revision 261896)
+++ gcc/go/gofrontend/MERGE (working copy)
@@ -1,4 +1,4 @@
-bdead75ea02fa852a559f35b41453df0c47c9a66
+7008302f1f0eaa9508b2857185505d4dc7baac1e
The first line of this file holds the git revision number of the last
merge done from the gofrontend repository.
Index: libgo/runtime/proc.c
===================================================================
--- libgo/runtime/proc.c (revision 261819)
+++ libgo/runtime/proc.c (working copy)
@@ -716,7 +716,7 @@ runtime_malg(bool allocatestack, bool si
G *newg;
byte* unused_stack;
uintptr unused_stacksize;
-#if USING_SPLIT_STACK
+#ifdef USING_SPLIT_STACK
int dont_block_signals = 0;
size_t ss_stacksize;
#endif
@@ -738,7 +738,7 @@ runtime_malg(bool allocatestack, bool si
#endif
}
-#if USING_SPLIT_STACK
+#ifdef USING_SPLIT_STACK
*ret_stack = __splitstack_makecontext(stacksize,
(void*)(&newg->stackcontext[0]),
&ss_stacksize);
@@ -777,7 +777,7 @@ void stackfree(G*)
void
stackfree(G* gp)
{
-#if USING_SPLIT_STACK
+#ifdef USING_SPLIT_STACK
__splitstack_releasecontext((void*)(&gp->stackcontext[0]));
#else
// If gcstacksize is 0, the stack is allocated by libc and will be
More information about the Gcc-patches
mailing list