aboutsummaryrefslogtreecommitdiff
path: root/src/runtime/sigqueue.go
diff options
context:
space:
mode:
authorShenghou Ma <minux@golang.org>2014-12-31 20:30:57 -0500
committerMinux Ma <minux@golang.org>2015-01-01 02:52:34 +0000
commit77cd6197d7561ab7ccbf5d892efb6f97d929546a (patch)
tree4058c56027ed8b6dd79c18f06be19b3458a3d6f5 /src/runtime/sigqueue.go
parent76b2f06ee54f92b104412bdf9fefd8e7915969d3 (diff)
downloadgo-77cd6197d7561ab7ccbf5d892efb6f97d929546a.tar.xz
runtime/cgo: initialize our pthread_create wrapper earlier on openbsd
This is a genuine bug exposed by our test for issue 9456: our wrapper for pthread_create is not initialized until we initialize cgo itself, but it is possible that a static constructor could call pthread_create, and in that case, it will be calling a nil function pointer. Fix that by also initializing the sys_pthread_create function pointer inside our pthread_create wrapper function, and use a pthread_once to make sure it is only initialized once. Fix build for openbsd. Change-Id: Ica4da2c21fcaec186fdd3379128ef46f0e767ed7 Reviewed-on: https://go-review.googlesource.com/2232 Reviewed-by: David Crawshaw <crawshaw@golang.org>
Diffstat (limited to 'src/runtime/sigqueue.go')
0 files changed, 0 insertions, 0 deletions