github.com/razvanm/vanadium-go-1.3@v0.0.0-20160721203343-4a65068e5915/src/runtime/rdebug.go (about)

     1  // Copyright 2014 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
     6  
     7  func setMaxStack(in int) (out int) {
     8  	out = int(maxstacksize)
     9  	maxstacksize = uintptr(in)
    10  	return out
    11  }
    12  
    13  func setGCPercent(in int32) (out int32) {
    14  	mp := acquirem()
    15  	mp.scalararg[0] = uintptr(int(in))
    16  	onM(setgcpercent_m)
    17  	out = int32(int(mp.scalararg[0]))
    18  	releasem(mp)
    19  	return out
    20  }
    21  
    22  func setPanicOnFault(new bool) (old bool) {
    23  	mp := acquirem()
    24  	old = mp.curg.paniconfault
    25  	mp.curg.paniconfault = new
    26  	releasem(mp)
    27  	return old
    28  }
    29  
    30  func setMaxThreads(in int) (out int) {
    31  	mp := acquirem()
    32  	mp.scalararg[0] = uintptr(in)
    33  	onM(setmaxthreads_m)
    34  	out = int(mp.scalararg[0])
    35  	releasem(mp)
    36  	return out
    37  }