f15fbdd7355aeae87d9b290bae7749327b82ce5e
[ghc.git] / testsuite / tests / concurrent / should_run / conc059_c.c
1 #include "HsFFI.h"
2 #include "conc059_stub.h"
3 #include <unistd.h>
4 #include <stdio.h>
5 #if mingw32_HOST_OS
6 #include <windows.h>
7 #endif
8
9 void __stginit_Test(void);
10
11 int main(int argc, char *argv[])
12 {
13 hs_init(&argc,&argv);
14 hs_add_root(__stginit_Test);
15 f(500000);
16 #if mingw32_HOST_OS
17 Sleep(100);
18 #else
19 usleep(100000);
20 #endif
21 printf("exiting...\n");
22 hs_exit();
23 printf("exited.\n");
24 #if mingw32_HOST_OS
25 Sleep(1000);
26 #else
27 usleep(1000000);
28 #endif
29 exit(0);
30 }