summaryrefslogtreecommitdiffstats
path: root/otherlibs/threads
diff options
context:
space:
mode:
Diffstat (limited to 'otherlibs/threads')
-rw-r--r--otherlibs/threads/Makefile2
-rw-r--r--otherlibs/threads/thread.ml5
-rw-r--r--otherlibs/threads/unix.ml5
3 files changed, 11 insertions, 1 deletions
diff --git a/otherlibs/threads/Makefile b/otherlibs/threads/Makefile
index 93651d8dc..7abf74aaa 100644
--- a/otherlibs/threads/Makefile
+++ b/otherlibs/threads/Makefile
@@ -19,7 +19,7 @@ CC=$(BYTECC)
CFLAGS=-I../../byterun -O $(BYTECCCOMPOPTS) $(SHAREDCCCOMPOPTS) -g
CAMLC=../../ocamlcomp.sh -I ../unix
MKLIB=../../boot/ocamlrun ../../tools/ocamlmklib
-COMPFLAGS=-w +33 -warn-error A
+COMPFLAGS=-w +33..38 -warn-error A
C_OBJS=scheduler.o
diff --git a/otherlibs/threads/thread.ml b/otherlibs/threads/thread.ml
index f4bbd8a5a..e3de604d2 100644
--- a/otherlibs/threads/thread.ml
+++ b/otherlibs/threads/thread.ml
@@ -28,6 +28,11 @@ type resumption_status =
Unix.file_descr list * Unix.file_descr list * Unix.file_descr list
| Resumed_wait of int * Unix.process_status
+(* to avoid warning *)
+let _ = [Resumed_wakeup; Resumed_delay; Resumed_join;
+ Resumed_io; Resumed_select ([], [], []);
+ Resumed_wait (0, Unix.WEXITED 0)]
+
(* It is mucho important that the primitives that reschedule are called
through an ML function call, not directly. That's because when such a
primitive returns, the bytecode interpreter is only semi-obedient:
diff --git a/otherlibs/threads/unix.ml b/otherlibs/threads/unix.ml
index 609c098a3..490facc76 100644
--- a/otherlibs/threads/unix.ml
+++ b/otherlibs/threads/unix.ml
@@ -36,6 +36,11 @@ type resumption_status =
| Resumed_select of file_descr list * file_descr list * file_descr list
| Resumed_wait of int * process_status
+(* to avoid warning *)
+let _ = [Resumed_wakeup; Resumed_delay; Resumed_join;
+ Resumed_io; Resumed_select ([], [], []);
+ Resumed_wait (0, WEXITED 0)]
+
external thread_initialize : unit -> unit = "thread_initialize"
external thread_wait_read : file_descr -> unit = "thread_wait_read"
external thread_wait_write : file_descr -> unit = "thread_wait_write"