Utiliser un signal legal pour le tick d'horloge
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@2222 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02master
parent
7734d87e77
commit
de02be3865
|
@ -53,7 +53,7 @@ let preempt signal = yield()
|
||||||
(* Initialization of the scheduler *)
|
(* Initialization of the scheduler *)
|
||||||
|
|
||||||
let _ =
|
let _ =
|
||||||
Sys.signal 1 (Sys.Signal_handle preempt);
|
Sys.signal Sys.sigterm (Sys.Signal_handle preempt);
|
||||||
thread_initialize()
|
thread_initialize()
|
||||||
|
|
||||||
(* Wait functions *)
|
(* Wait functions *)
|
||||||
|
|
|
@ -37,8 +37,8 @@
|
||||||
/* Max computation time before rescheduling, in microseconds (50ms) */
|
/* Max computation time before rescheduling, in microseconds (50ms) */
|
||||||
#define Thread_timeout 50000
|
#define Thread_timeout 50000
|
||||||
|
|
||||||
/* Signal used for timer preemption (any unused signal number) */
|
/* Signal used for timer preemption (any unused, legal signal number) */
|
||||||
#define SIGTIMER 1
|
#define SIGTIMER SIGTERM
|
||||||
|
|
||||||
/* The ML value describing a thread (heap-allocated) */
|
/* The ML value describing a thread (heap-allocated) */
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue