Commit 4d17efe8 authored by Russ Cox's avatar Russ Cox

misc/cgo/test: test recursive internal OS thread lock

This would have failed with CL 11663043.

R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/11480045
parent 6efb6b9e
......@@ -15,6 +15,14 @@ import (
"testing"
)
func init() {
// Same as test3775 but run during init so that
// there are two levels of internal runtime lock
// (1 for init, 1 for cgo).
// This would have been broken by CL 11663043.
C.lockOSThreadC()
}
func test3775(t *testing.T) {
// Used to panic because of the UnlockOSThread below.
C.lockOSThreadC()
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment