Suite portage Mingw
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@4919 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02master
parent
e7c71c10da
commit
8ab1afe7b1
|
@ -93,7 +93,7 @@ COMPOBJS=$(UTILS) $(PARSING) $(TYPING) $(COMP) $(BYTECOMP) $(DRIVER)
|
|||
|
||||
TOPLIB=$(UTILS) $(PARSING) $(TYPING) $(COMP) $(BYTECOMP) $(TOPLEVEL)
|
||||
|
||||
TOPOBJS=$(TOPLEVELLIB) $(TOPLEVELMAIN)
|
||||
TOPOBJS=$(TOPLEVELLIB) $(TOPLEVELSTART)
|
||||
|
||||
OPTOBJS=$(OPTUTILS) $(PARSING) $(TYPING) $(COMP) $(ASMCOMP) $(OPTDRIVER)
|
||||
|
||||
|
|
|
@ -28,7 +28,7 @@ all: dllthreads.dll libthreads.$(A) threads.cma
|
|||
allopt: libthreadsnat.$(A) threads.cmxa
|
||||
|
||||
dllthreads.dll: win32_b.$(DO)
|
||||
$(call MKDLL,dllthreads.dll,tmp.lib,win32_b.$(DO) ../../byterun/ocamlrun.$(A))
|
||||
$(call MKDLL,dllthreads.dll,tmp.$(A),win32_b.$(DO) ../../byterun/ocamlrun.$(A))
|
||||
rm tmp.*
|
||||
|
||||
libthreads.$(A): win32_b.$(SO)
|
||||
|
@ -43,7 +43,7 @@ win32_b.$(SO): win32.c
|
|||
mv win32.$(O) win32_b.$(SO)
|
||||
|
||||
libthreadsnat.$(A): win32_n.$(O)
|
||||
$(call MKLIB,libthreadsnat.lib,win32_n.$(O))
|
||||
$(call MKLIB,libthreadsnat.$(A),win32_n.$(O))
|
||||
|
||||
win32_n.$(O): win32.c
|
||||
$(NATIVECC) -DNATIVE_CODE -O -I../../asmrun -I../../byterun $(NATIVECCCOMPOPTS) -c win32.c
|
||||
|
|
|
@ -16,6 +16,7 @@
|
|||
/* Thread interface for Win32 threads */
|
||||
|
||||
#include <windows.h>
|
||||
#include <process.h>
|
||||
#include <signal.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
@ -250,7 +251,7 @@ static void caml_io_mutex_unlock_exn(void)
|
|||
|
||||
/* The "tick" thread fakes a signal at regular intervals. */
|
||||
|
||||
static void * caml_thread_tick(void)
|
||||
static void caml_thread_tick(void * arg)
|
||||
{
|
||||
while(1) {
|
||||
Sleep(Thread_timeout);
|
||||
|
@ -330,8 +331,9 @@ CAMLprim value caml_thread_initialize(value unit)
|
|||
|
||||
/* Create a thread */
|
||||
|
||||
static void caml_thread_start(caml_thread_t th)
|
||||
static void caml_thread_start(void * arg)
|
||||
{
|
||||
caml_thread_t th = (caml_thread_t) arg;
|
||||
value clos;
|
||||
|
||||
/* Associate the thread descriptor with the thread */
|
||||
|
@ -710,6 +712,6 @@ CAMLprim value caml_wait_signal(value sigs)
|
|||
static void caml_wthread_error(char * msg)
|
||||
{
|
||||
char errmsg[1024];
|
||||
sprintf(errmsg, "%s: error code %lx\n", msg, GetLastError());
|
||||
sprintf(errmsg, "%s: error code %lx", msg, GetLastError());
|
||||
raise_sys_error(copy_string(errmsg));
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue