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.
4
5package runtime
6
7import (
8	_ "unsafe"
9)
10
11//go:linkname runtime_ignoreHangup internal..z2fpoll.runtime_ignoreHangup
12func runtime_ignoreHangup() {
13	getg().m.ignoreHangup = true
14}
15
16//go:linkname runtime_unignoreHangup internal..z2fpoll.runtime_unignoreHangup
17func runtime_unignoreHangup(sig string) {
18	getg().m.ignoreHangup = false
19}
20
21func ignoredNote(note *byte) bool {
22	if note == nil {
23		return false
24	}
25	if gostringnocopy(note) != "hangup" {
26		return false
27	}
28	return getg().m.ignoreHangup
29}
30