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 <process.h>
6#include <stdlib.h>
7#include <stdio.h>
8
9void gopanic(void);
10
11static unsigned int __attribute__((__stdcall__))
12die(void* x)
13{
14	gopanic();
15	return 0;
16}
17
18void
19start(void)
20{
21	if(_beginthreadex(0, 0, die, 0, 0, 0) != 0)
22		printf("_beginthreadex failed\n");
23}
24