github.com/varialus/godfly@v0.0.0-20130904042352-1934f9f095ab/misc/cgo/test/backdoor/runtime.c (about)

     1  // Copyright 2011 The Go Authors.  All rights reserved.
     2  // Use of this source code is governed by a BSD-style
     3  // license that can be found in the LICENSE file.
     4  
     5  // Expose some runtime functions for testing.
     6  // Must be in a non-cgo-using package so that
     7  // the go command compiles this file with 6c, not gcc.
     8  
     9  // +build gc
    10  
    11  typedef char bool;
    12  
    13  bool runtime·lockedOSThread(void);
    14  
    15  static void
    16  FLUSH(void*)
    17  {
    18  }
    19  
    20  void
    21  ·LockedOSThread(bool b)
    22  {
    23  	b = runtime·lockedOSThread();
    24  	FLUSH(&b);
    25  }