mirror of
https://github.com/golang/go
synced 2024-11-02 08:01:26 +00:00
misc/cgo/test: fix build
The last CL forgot the all-important 'backdoor' package. Cgo-using packages compile .c files with gcc, but we want to compile this one with 6c, so put it in a non-cgo package. TBR=golang-dev CC=golang-dev https://golang.org/cl/5758063
This commit is contained in:
parent
7c7966a426
commit
fc98f28204
2 changed files with 10 additions and 1 deletions
7
misc/cgo/test/backdoor/backdoor.go
Normal file
7
misc/cgo/test/backdoor/backdoor.go
Normal file
|
@ -0,0 +1,7 @@
|
|||
// Copyright 2012 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.
|
||||
|
||||
package backdoor
|
||||
|
||||
func LockedOSThread() bool // in runtime.c
|
|
@ -3,6 +3,8 @@
|
|||
// license that can be found in the LICENSE file.
|
||||
|
||||
// Expose some runtime functions for testing.
|
||||
// Must be in a non-cgo-using package so that
|
||||
// the go command compiles this file with 6c, not gcc.
|
||||
|
||||
typedef char bool;
|
||||
|
||||
|
@ -14,7 +16,7 @@ FLUSH(void*)
|
|||
}
|
||||
|
||||
void
|
||||
·lockedOSThread(bool b)
|
||||
·LockedOSThread(bool b)
|
||||
{
|
||||
b = runtime·lockedOSThread();
|
||||
FLUSH(&b);
|
Loading…
Reference in a new issue