blob: 4643559705f8b114e855bb1ae661e442218638ef (
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
30
31
32
33
34
35
36
37
38
39
40
|
// Copyright 2009 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.
// This file implements runtime support for signal handling.
package runtime
func signal_recv() (m uint32) {
for {
mp := acquirem()
onM(signal_recv_m)
ok := mp.scalararg[0] != 0
m = uint32(mp.scalararg[1])
releasem(mp)
if ok {
return
}
notetsleepg(&signote, -1)
noteclear(&signote)
}
}
func signal_enable(s uint32) {
mp := acquirem()
mp.scalararg[0] = uintptr(s)
onM(signal_enable_m)
releasem(mp)
}
func signal_disable(s uint32) {
mp := acquirem()
mp.scalararg[0] = uintptr(s)
onM(signal_disable_m)
releasem(mp)
}
func signal_recv_m()
func signal_enable_m()
func signal_disable_m()
|