# HG changeset patch # User wenzelm # Date 1254303372 -7200 # Node ID 1504f9c2d0605855809c93e51a30db1ea78cecfa # Parent d498770eefdcb4d14103fc0bffc99a15a8d67906 more uniform treatment of structure Unsynchronized in ML bootstrap phase; diff -r d498770eefdc -r 1504f9c2d060 src/Pure/ML-Systems/mosml.ML --- a/src/Pure/ML-Systems/mosml.ML Wed Sep 30 09:25:18 2009 +0200 +++ b/src/Pure/ML-Systems/mosml.ML Wed Sep 30 11:36:12 2009 +0200 @@ -40,8 +40,8 @@ exception Interrupt; fun reraise exn = raise exn; +use "ML-Systems/unsynchronized.ML"; use "ML-Systems/exn.ML"; -use "ML-Systems/unsynchronized.ML"; use "ML-Systems/universal.ML"; use "ML-Systems/thread_dummy.ML"; use "ML-Systems/multithreading.ML"; diff -r d498770eefdc -r 1504f9c2d060 src/Pure/ML-Systems/multithreading.ML --- a/src/Pure/ML-Systems/multithreading.ML Wed Sep 30 09:25:18 2009 +0200 +++ b/src/Pure/ML-Systems/multithreading.ML Wed Sep 30 11:36:12 2009 +0200 @@ -14,7 +14,7 @@ sig include BASIC_MULTITHREADING val available: bool - val max_threads: int ref + val max_threads: int Unsynchronized.ref val max_threads_value: unit -> int val enabled: unit -> bool val no_interrupts: Thread.threadAttribute list @@ -24,7 +24,7 @@ val with_attributes: Thread.threadAttribute list -> (Thread.threadAttribute list -> 'a) -> 'a val sync_wait: Thread.threadAttribute list option -> Time.time option -> ConditionVar.conditionVar -> Mutex.mutex -> bool Exn.result - val trace: int ref + val trace: int Unsynchronized.ref val tracing: int -> (unit -> string) -> unit val tracing_time: bool -> Time.time -> (unit -> string) -> unit val real_time: ('a -> unit) -> 'a -> Time.time @@ -38,7 +38,7 @@ (* options *) val available = false; -val max_threads = ref (1: int); +val max_threads = Unsynchronized.ref (1: int); fun max_threads_value () = 1: int; fun enabled () = false; @@ -57,7 +57,7 @@ (* tracing *) -val trace = ref (0: int); +val trace = Unsynchronized.ref (0: int); fun tracing _ _ = (); fun tracing_time _ _ _ = (); fun real_time f x = (f x; Time.zeroTime); @@ -72,7 +72,7 @@ (* serial numbers *) -local val count = ref (0: int) +local val count = Unsynchronized.ref (0: int) in fun serial () = (count := ! count + 1; ! count) end; end; diff -r d498770eefdc -r 1504f9c2d060 src/Pure/ML-Systems/polyml-5.0.ML --- a/src/Pure/ML-Systems/polyml-5.0.ML Wed Sep 30 09:25:18 2009 +0200 +++ b/src/Pure/ML-Systems/polyml-5.0.ML Wed Sep 30 11:36:12 2009 +0200 @@ -5,6 +5,7 @@ fun reraise exn = raise exn; +use "ML-Systems/unsynchronized.ML"; use "ML-Systems/universal.ML"; use "ML-Systems/thread_dummy.ML"; use "ML-Systems/ml_name_space.ML"; diff -r d498770eefdc -r 1504f9c2d060 src/Pure/ML-Systems/polyml-5.1.ML --- a/src/Pure/ML-Systems/polyml-5.1.ML Wed Sep 30 09:25:18 2009 +0200 +++ b/src/Pure/ML-Systems/polyml-5.1.ML Wed Sep 30 11:36:12 2009 +0200 @@ -5,6 +5,7 @@ fun reraise exn = raise exn; +use "ML-Systems/unsynchronized.ML"; use "ML-Systems/thread_dummy.ML"; use "ML-Systems/ml_name_space.ML"; use "ML-Systems/polyml_common.ML"; diff -r d498770eefdc -r 1504f9c2d060 src/Pure/ML-Systems/polyml-experimental.ML --- a/src/Pure/ML-Systems/polyml-experimental.ML Wed Sep 30 09:25:18 2009 +0200 +++ b/src/Pure/ML-Systems/polyml-experimental.ML Wed Sep 30 11:36:12 2009 +0200 @@ -3,6 +3,8 @@ Compatibility wrapper for Poly/ML 5.3. *) +use "ML-Systems/unsynchronized.ML"; + open Thread; structure ML_Name_Space = diff -r d498770eefdc -r 1504f9c2d060 src/Pure/ML-Systems/polyml.ML --- a/src/Pure/ML-Systems/polyml.ML Wed Sep 30 09:25:18 2009 +0200 +++ b/src/Pure/ML-Systems/polyml.ML Wed Sep 30 11:36:12 2009 +0200 @@ -3,6 +3,8 @@ Compatibility wrapper for Poly/ML 5.2 and 5.2.1. *) +use "ML-Systems/unsynchronized.ML"; + open Thread; structure ML_Name_Space = diff -r d498770eefdc -r 1504f9c2d060 src/Pure/ML-Systems/polyml_common.ML --- a/src/Pure/ML-Systems/polyml_common.ML Wed Sep 30 09:25:18 2009 +0200 +++ b/src/Pure/ML-Systems/polyml_common.ML Wed Sep 30 11:36:12 2009 +0200 @@ -6,7 +6,6 @@ exception Interrupt = SML90.Interrupt; use "ML-Systems/exn.ML"; -use "ML-Systems/unsynchronized.ML"; use "ML-Systems/multithreading.ML"; use "ML-Systems/time_limit.ML"; use "ML-Systems/timing.ML"; diff -r d498770eefdc -r 1504f9c2d060 src/Pure/ML-Systems/smlnj.ML --- a/src/Pure/ML-Systems/smlnj.ML Wed Sep 30 09:25:18 2009 +0200 +++ b/src/Pure/ML-Systems/smlnj.ML Wed Sep 30 11:36:12 2009 +0200 @@ -7,9 +7,9 @@ fun reraise exn = raise exn; use "ML-Systems/proper_int.ML"; +use "ML-Systems/unsynchronized.ML"; use "ML-Systems/overloading_smlnj.ML"; use "ML-Systems/exn.ML"; -use "ML-Systems/unsynchronized.ML"; use "ML-Systems/universal.ML"; use "ML-Systems/thread_dummy.ML"; use "ML-Systems/multithreading.ML"; diff -r d498770eefdc -r 1504f9c2d060 src/Pure/ML-Systems/thread_dummy.ML --- a/src/Pure/ML-Systems/thread_dummy.ML Wed Sep 30 09:25:18 2009 +0200 +++ b/src/Pure/ML-Systems/thread_dummy.ML Wed Sep 30 11:36:12 2009 +0200 @@ -60,7 +60,7 @@ local -val data = ref ([]: Universal.universal ref list); +val data = Unsynchronized.ref ([]: Universal.universal Unsynchronized.ref list); fun find_data tag = let @@ -75,7 +75,7 @@ fun setLocal (tag, x) = (case find_data tag of SOME r => r := Universal.tagInject tag x - | NONE => data := ref (Universal.tagInject tag x) :: ! data); + | NONE => data := Unsynchronized.ref (Universal.tagInject tag x) :: ! data); end; end;