github.com/bgentry/go@v0.0.0-20150121062915-6cf5a733d54d/src/runtime/stack.h (about)

     1  // Copyright 2011 The Go Authors.  All rights reserved.
     2  // Use of this source code is governed by a BSD-style
     3  // license that can be found in the LICENSE file.
     4  
     5  // For the linkers. Must match Go definitions.
     6  // TODO(rsc): Share Go definitions with linkers directly.
     7  
     8  enum {
     9  #ifdef GOOS_windows
    10  #define StackSystem (512*sizeof(uintptr))
    11  #else
    12  #ifdef GOOS_plan9
    13  #define StackSystem (512)
    14  #else
    15  	StackSystem = 0,
    16  #endif	// Plan 9
    17  #endif	// Windows
    18  
    19  	StackBig = 4096,
    20  	StackGuard = 640 + StackSystem,
    21  	StackSmall = 128,
    22  	StackLimit = StackGuard - StackSystem - StackSmall,
    23  };
    24  
    25  #define StackPreempt ((uint64)-1314)
    26  /*c2go
    27  enum
    28  {
    29  	StackPreempt = 1, // TODO: Change to (uint64)-1314 in Go translation
    30  };
    31  */