mirror of
https://github.com/golang/go
synced 2024-11-20 06:44:40 -07:00
b2cdf30eb6
The conversion was done with an automated tool and then modified only as necessary to make it compile and run. [This CL is part of the removal of C code from package runtime. See golang.org/s/dev.cc for an overview.] LGTM=r R=r, daniel.morsing CC=austin, dvyukov, golang-codereviews, iant, khr https://golang.org/cl/172260043
20 lines
429 B
Go
20 lines
429 B
Go
// Copyright 2014 The Go Authors. All rights reserved.
|
|
// Use of this source code is governed by a BSD-style
|
|
// license that can be found in the LICENSE file.
|
|
|
|
package runtime
|
|
|
|
func setMaxStack(in int) (out int) {
|
|
out = int(maxstacksize)
|
|
maxstacksize = uintptr(in)
|
|
return out
|
|
}
|
|
|
|
func setPanicOnFault(new bool) (old bool) {
|
|
mp := acquirem()
|
|
old = mp.curg.paniconfault
|
|
mp.curg.paniconfault = new
|
|
releasem(mp)
|
|
return old
|
|
}
|