github.com/aloncn/graphics-go@v0.0.1/src/runtime/testdata/testprogcgo/threadpanic_windows.c (about) 1 // Copyright 2015 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 #include <stdlib.h> 6 #include <stdio.h> 7 8 void gopanic(void); 9 10 static void* 11 die(void* x) 12 { 13 gopanic(); 14 return 0; 15 } 16 17 void 18 start(void) 19 { 20 if(_beginthreadex(0, 0, die, 0, 0, 0) != 0) 21 printf("_beginthreadex failed\n"); 22 }