Commit 88d51f79 by Ian Lance Taylor

runtime: use #ifdef instead of #if for USING_SPLIT_STACK

    
    USING_SPLIT_STACK is configured as defined/undefined, not 0/1.
    Most of the places test USING_SPLIT_STACK with #ifdef, with a
    few exceptions. This CL fixes the exceptions.
    
    Reviewed-on: https://go-review.googlesource.com/120596

From-SVN: r261980
parent a8bd2589
bdead75ea02fa852a559f35b41453df0c47c9a66 7008302f1f0eaa9508b2857185505d4dc7baac1e
The first line of this file holds the git revision number of the last The first line of this file holds the git revision number of the last
merge done from the gofrontend repository. merge done from the gofrontend repository.
...@@ -716,7 +716,7 @@ runtime_malg(bool allocatestack, bool signalstack, byte** ret_stack, uintptr* re ...@@ -716,7 +716,7 @@ runtime_malg(bool allocatestack, bool signalstack, byte** ret_stack, uintptr* re
G *newg; G *newg;
byte* unused_stack; byte* unused_stack;
uintptr unused_stacksize; uintptr unused_stacksize;
#if USING_SPLIT_STACK #ifdef USING_SPLIT_STACK
int dont_block_signals = 0; int dont_block_signals = 0;
size_t ss_stacksize; size_t ss_stacksize;
#endif #endif
...@@ -738,7 +738,7 @@ runtime_malg(bool allocatestack, bool signalstack, byte** ret_stack, uintptr* re ...@@ -738,7 +738,7 @@ runtime_malg(bool allocatestack, bool signalstack, byte** ret_stack, uintptr* re
#endif #endif
} }
#if USING_SPLIT_STACK #ifdef USING_SPLIT_STACK
*ret_stack = __splitstack_makecontext(stacksize, *ret_stack = __splitstack_makecontext(stacksize,
(void*)(&newg->stackcontext[0]), (void*)(&newg->stackcontext[0]),
&ss_stacksize); &ss_stacksize);
...@@ -777,7 +777,7 @@ void stackfree(G*) ...@@ -777,7 +777,7 @@ void stackfree(G*)
void void
stackfree(G* gp) stackfree(G* gp)
{ {
#if USING_SPLIT_STACK #ifdef USING_SPLIT_STACK
__splitstack_releasecontext((void*)(&gp->stackcontext[0])); __splitstack_releasecontext((void*)(&gp->stackcontext[0]));
#else #else
// If gcstacksize is 0, the stack is allocated by libc and will be // If gcstacksize is 0, the stack is allocated by libc and will be
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment