diff options
Diffstat (limited to 'otherlibs/win32unix/startup.c')
-rw-r--r-- | otherlibs/win32unix/startup.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/otherlibs/win32unix/startup.c b/otherlibs/win32unix/startup.c index ae584e569..bbf5fe1fe 100644 --- a/otherlibs/win32unix/startup.c +++ b/otherlibs/win32unix/startup.c @@ -16,6 +16,8 @@ #include <stdlib.h> #include <mlvalues.h> #include "unixsupport.h" +#include "winworker.h" +#include "windbug.h" value val_process_id; @@ -26,18 +28,27 @@ CAMLprim value win_startup(unit) int i; HANDLE h; + DBUG_INIT; + (void) WSAStartup(MAKEWORD(2, 0), &wsaData); DuplicateHandle(GetCurrentProcess(), GetCurrentProcess(), GetCurrentProcess(), &h, 0, TRUE, DUPLICATE_SAME_ACCESS); val_process_id = Val_int(h); + worker_init(); + return Val_unit; } CAMLprim value win_cleanup(unit) value unit; { + worker_cleanup(); + (void) WSACleanup(); + + DBUG_CLEANUP; + return Val_unit; } |