1
0
mirror of https://github.com/golang/go synced 2024-11-12 08:00:22 -07:00

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:
Ian Lance Taylor 2012-11-01 13:54:09 -07:00
parent 03c52a5d65
commit 538a58bb75
2 changed files with 20 additions and 0 deletions

View File

@ -6,6 +6,8 @@
// Must be in a non-cgo-using package so that
// the go command compiles this file with 6c, not gcc.
// +build gc
typedef char bool;
bool runtime·lockedOSThread(void);

View File

@ -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();
}