mirror of https://github.com/golang/go.git
misc/cgo/test: changes to pass when using gccgo
R=golang-dev, rsc CC=golang-dev https://golang.org/cl/6821067
This commit is contained in:
parent
03c52a5d65
commit
538a58bb75
|
|
@ -6,6 +6,8 @@
|
||||||
// Must be in a non-cgo-using package so that
|
// Must be in a non-cgo-using package so that
|
||||||
// the go command compiles this file with 6c, not gcc.
|
// the go command compiles this file with 6c, not gcc.
|
||||||
|
|
||||||
|
// +build gc
|
||||||
|
|
||||||
typedef char bool;
|
typedef char bool;
|
||||||
|
|
||||||
bool runtime·lockedOSThread(void);
|
bool runtime·lockedOSThread(void);
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,18 @@
|
||||||
|
// 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.
|
||||||
|
|
||||||
|
// Expose some runtime functions for testing.
|
||||||
|
// This is the gccgo version of runtime.c.
|
||||||
|
|
||||||
|
// +build gccgo
|
||||||
|
|
||||||
|
_Bool runtime_lockedOSThread(void);
|
||||||
|
|
||||||
|
_Bool LockedOSThread(void) asm(GOPKGPATH ".LockedOSThread");
|
||||||
|
|
||||||
|
_Bool
|
||||||
|
LockedOSThread(void)
|
||||||
|
{
|
||||||
|
return runtime_lockedOSThread();
|
||||||
|
}
|
||||||
Loading…
Reference in New Issue