2017-03-02 Richard Biener <rguenther@suse.de>
[official-gcc.git] / libgo / go / runtime / net_plan9.go
blob10fd089aea327287b9c4d7aff6ab68ef7b25ca9b
1 // Copyright 2016 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.
5 package runtime
7 import (
8 _ "unsafe"
11 //go:linkname runtime_ignoreHangup net.runtime_ignoreHangup
12 func runtime_ignoreHangup() {
13 getg().m.ignoreHangup = true
16 //go:linkname runtime_unignoreHangup net.runtime_unignoreHangup
17 func runtime_unignoreHangup(sig string) {
18 getg().m.ignoreHangup = false
21 func ignoredNote(note *byte) bool {
22 if note == nil {
23 return false
25 if gostringnocopy(note) != "hangup" {
26 return false
28 return getg().m.ignoreHangup