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:
parent
03c52a5d65
commit
538a58bb75
@ -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);
|
||||
|
18
misc/cgo/test/backdoor/runtime_gccgo.c
Normal file
18
misc/cgo/test/backdoor/runtime_gccgo.c
Normal 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();
|
||||
}
|
Loading…
Reference in New Issue
Block a user