mirror of
https://github.com/golang/go
synced 2024-11-22 20:24:47 -07:00
fc98f28204
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
24 lines
474 B
C
24 lines
474 B
C
// Copyright 2011 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.
|
|
// Must be in a non-cgo-using package so that
|
|
// the go command compiles this file with 6c, not gcc.
|
|
|
|
typedef char bool;
|
|
|
|
bool runtime·lockedOSThread(void);
|
|
|
|
static void
|
|
FLUSH(void*)
|
|
{
|
|
}
|
|
|
|
void
|
|
·LockedOSThread(bool b)
|
|
{
|
|
b = runtime·lockedOSThread();
|
|
FLUSH(&b);
|
|
}
|