...
Run Format

Source file src/runtime/rdebug.go

     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	import _ "unsafe" // for go:linkname
     8	
     9	//go:linkname setMaxStack runtime/debug.setMaxStack
    10	func setMaxStack(in int) (out int) {
    11		out = int(maxstacksize)
    12		maxstacksize = uintptr(in)
    13		return out
    14	}
    15	
    16	//go:linkname setPanicOnFault runtime/debug.setPanicOnFault
    17	func setPanicOnFault(new bool) (old bool) {
    18		_g_ := getg()
    19		old = _g_.paniconfault
    20		_g_.paniconfault = new
    21		return old
    22	}
    23	

View as plain text