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.
8 #include "_cgo_export.h"
13 // use some stack space
14 volatile char data
[64*1024];
18 data
[sizeof(data
)-1] = 0;
24 extern void goFoo(void);
37 mysleep(int seconds
) {
38 long long st
= GetTickCount();
39 Sleep(1000 * seconds
);
45 mysleep(int seconds
) {
48 gettimeofday(&tv
, NULL
);
49 st
= tv
.tv_sec
* 1000 + tv
.tv_usec
/ 1000;
63 callGoStackCheck(void)
65 extern void goStackCheck(void);
72 extern int goReturnVal(void);
78 returnAfterGrowFromGo(void)
80 extern int goReturnVal(void);
85 callGoWithString(void)
87 extern void goWithString(GoString
);
88 const char *str
= "string passed from C to Go";
89 goWithString((GoString
){str
, strlen(str
)});