github.com/llvm-mirror/llgo@v0.0.0-20190322182713-bf6f0a60fce1/third_party/gofrontend/libgo/runtime/rdebug.goc (about) 1 // Copyright 2013 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 package runtime_debug 6 #include "runtime.h" 7 #include "arch.h" 8 #include "malloc.h" 9 10 func setMaxStack(in int) (out int) { 11 out = runtime_maxstacksize; 12 runtime_maxstacksize = in; 13 } 14 15 func setGCPercent(in int) (out int) { 16 out = runtime_setgcpercent(in); 17 } 18 19 func setMaxThreads(in int) (out int) { 20 out = runtime_setmaxthreads(in); 21 } 22 23 func SetPanicOnFault(enabled bool) (old bool) { 24 old = runtime_g()->paniconfault; 25 runtime_g()->paniconfault = enabled; 26 }