summaryrefslogtreecommitdiffstats
path: root/otherlibs/win32unix/startup.c
diff options
context:
space:
mode:
authorXavier Leroy <xavier.leroy@inria.fr>2008-07-29 08:31:41 +0000
committerXavier Leroy <xavier.leroy@inria.fr>2008-07-29 08:31:41 +0000
commit776ae225a0cc5fa44b9279f81d45e9fd3dfa3cca (patch)
treef647c865d1681b0b8678ebb0c53c731055064c03 /otherlibs/win32unix/startup.c
parentdf023f535b9b4bb051cbce6dc39ea3b835bb80f1 (diff)
ocamldebug under Win32 (S. Le Gall, Lexifi)
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@8955 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
Diffstat (limited to 'otherlibs/win32unix/startup.c')
-rw-r--r--otherlibs/win32unix/startup.c11
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;
}