diff options
author | Xavier Leroy <xavier.leroy@inria.fr> | 1998-07-02 09:53:27 +0000 |
---|---|---|
committer | Xavier Leroy <xavier.leroy@inria.fr> | 1998-07-02 09:53:27 +0000 |
commit | c572266d53872973664ad43e183e30a2ae96268b (patch) | |
tree | 2627356f8d5b0fd4d7ac615918e63e0c931ed7fd /otherlibs/systhreads | |
parent | 6ba0586e3e91773d0308020d01dd92587fa2b8d1 (diff) |
CreateThread -> _beginthread
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@2009 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
Diffstat (limited to 'otherlibs/systhreads')
-rw-r--r-- | otherlibs/systhreads/win32.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/otherlibs/systhreads/win32.c b/otherlibs/systhreads/win32.c index ad2c12339..e46cdf383 100644 --- a/otherlibs/systhreads/win32.c +++ b/otherlibs/systhreads/win32.c @@ -284,10 +284,14 @@ value caml_thread_initialize(value unit) /* ML */ channel_mutex_unlock = caml_io_mutex_unlock; channel_mutex_unlock_exn = caml_io_mutex_unlock_exn; /* Fork the tick thread */ +#if 0 tick_thread = CreateThread(NULL, 0, (LPTHREAD_START_ROUTINE)&caml_thread_tick, NULL, 0, &tick_id); if (tick_thread == NULL) caml_wthread_error("Thread.init"); +#endif + tick_thread = (HANDLE) _beginthread(caml_thread_tick, 0, NULL); + if (tick_thread == (HANDLE)(-1)) caml_wthread_error("Thread.init"); CloseHandle(tick_thread); End_roots(); return Val_unit; @@ -363,10 +367,14 @@ value caml_thread_new(value clos) /* ML */ curr_thread->next->prev = th; curr_thread->next = th; /* Fork the new thread */ +#if 0 th->wthread = CreateThread(NULL,0, (LPTHREAD_START_ROUTINE) caml_thread_start, (void *) th, 0, &th_id); if (th->wthread == NULL) { +#endif + th->wthread = (HANDLE) _beginthread(caml_thread_start, 0, (void *) th); + if (th->wthread == (HANDLE)(-1)) { /* Fork failed, remove thread info block from list of threads */ th->next->prev = curr_thread; curr_thread->next = th->next; |