1 // Copyright 2015 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.
11 #cgo LDFLAGS: -pthread
12 extern int RunSigThread();
13 extern int CheckBlocked();
25 //export IntoGoAndBack
26 func IntoGoAndBack() {
27 // Verify that SIGIO stays blocked on the C thread
28 // even when unblocked for signal.Notify().
29 signal
.Notify(make(chan os
.Signal
), syscall
.SIGIO
)
30 blocked
= C
.CheckBlocked() != 0
33 func testSigprocmask(t
*testing
.T
) {
34 if r
:= C
.RunSigThread(); r
!= 0 {
35 t
.Error("pthread_create/pthread_join failed")
38 t
.Error("Go runtime unblocked SIGIO")