1// Copyright 2018 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 5package main 6 7/* 8typedef void callback(char*); 9extern void CallGoBigStack1(char*); 10extern void bigStack(callback*); 11*/ 12import "C" 13 14func init() { 15 register("BigStack", BigStack) 16} 17 18func BigStack() { 19 // Create a large thread stack and call back into Go to test 20 // if Go correctly determines the stack bounds. 21 C.bigStack((*C.callback)(C.CallGoBigStack1)) 22} 23 24//export goBigStack1 25func goBigStack1(x *C.char) { 26 println("OK") 27} 28