summaryrefslogtreecommitdiff
path: root/libgo/go/runtime/net_plan9.go
blob: 907c31975c75f6dc0774cd35043fe4fb60293da7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
// Copyright 2016 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

import (
	_ "unsafe"
)

//go:linkname runtime_ignoreHangup internal..z2fpoll.runtime_ignoreHangup
func runtime_ignoreHangup() {
	getg().m.ignoreHangup = true
}

//go:linkname runtime_unignoreHangup internal..z2fpoll.runtime_unignoreHangup
func runtime_unignoreHangup(sig string) {
	getg().m.ignoreHangup = false
}

func ignoredNote(note *byte) bool {
	if note == nil {
		return false
	}
	if gostringnocopy(note) != "hangup" {
		return false
	}
	return getg().m.ignoreHangup
}