simplified polyml-5.5.2 setup -- implicit upgrade of Thread.numProcessors;
authorwenzelm
Thu Dec 12 13:50:44 2013 +0100 (2013-12-12 ago)
changeset 54723124432e77ecf
parent 54722 5f5608bfe230
child 54724 b92694e756b8
simplified polyml-5.5.2 setup -- implicit upgrade of Thread.numProcessors;
src/Pure/ML-Systems/multithreading_polyml.ML
src/Pure/ML-Systems/polyml.ML
src/Pure/ML-Systems/thread_physical_processors.ML
src/Pure/ROOT
     1.1 --- a/src/Pure/ML-Systems/multithreading_polyml.ML	Thu Dec 12 13:23:23 2013 +0100
     1.2 +++ b/src/Pure/ML-Systems/multithreading_polyml.ML	Thu Dec 12 13:50:44 2013 +0100
     1.3 @@ -81,12 +81,7 @@
     1.4  
     1.5  fun max_threads_result m =
     1.6    if m > 0 then m
     1.7 -  else
     1.8 -    let val n =
     1.9 -      (case Thread.numPhysicalProcessors () of
    1.10 -        SOME n => n
    1.11 -      | NONE => Thread.numProcessors ())
    1.12 -    in Int.min (Int.max (n, 1), 8) end;
    1.13 +  else Int.min (Int.max (Thread.numProcessors (), 1), 8);
    1.14  
    1.15  val max_threads = ref 1;
    1.16  
     2.1 --- a/src/Pure/ML-Systems/polyml.ML	Thu Dec 12 13:23:23 2013 +0100
     2.2 +++ b/src/Pure/ML-Systems/polyml.ML	Thu Dec 12 13:50:44 2013 +0100
     2.3 @@ -44,9 +44,6 @@
     2.4  else use "ML-Systems/single_assignment_polyml.ML";
     2.5  
     2.6  open Thread;
     2.7 -if ML_System.name = "polyml-5.5.2" then ()
     2.8 -else use "ML-Systems/thread_physical_processors.ML";
     2.9 -
    2.10  use "ML-Systems/multithreading.ML";
    2.11  use "ML-Systems/multithreading_polyml.ML";
    2.12  
     3.1 --- a/src/Pure/ML-Systems/thread_physical_processors.ML	Thu Dec 12 13:23:23 2013 +0100
     3.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     3.3 @@ -1,12 +0,0 @@
     3.4 -(*  Title:      Pure/ML-Systems/thread_physical_processors.ML
     3.5 -    Author:     Makarius
     3.6 -
     3.7 -Emulation of structure Thread in Poly/ML 5.5.2 (SVN 1890).
     3.8 -*)
     3.9 -
    3.10 -structure Thread =
    3.11 -struct
    3.12 -  open Thread;
    3.13 -
    3.14 -  fun numPhysicalProcessors () : int option = NONE;
    3.15 -end;
     4.1 --- a/src/Pure/ROOT	Thu Dec 12 13:23:23 2013 +0100
     4.2 +++ b/src/Pure/ROOT	Thu Dec 12 13:50:44 2013 +0100
     4.3 @@ -12,6 +12,7 @@
     4.4      "ML-Systems/multithreading_polyml.ML"
     4.5      "ML-Systems/overloading_smlnj.ML"
     4.6      "ML-Systems/polyml.ML"
     4.7 +    "ML-Systems/polyml-5.5.2.ML"
     4.8      "ML-Systems/pp_dummy.ML"
     4.9      "ML-Systems/proper_int.ML"
    4.10      "ML-Systems/single_assignment.ML"
    4.11 @@ -19,7 +20,6 @@
    4.12      "ML-Systems/share_common_data_polyml-5.3.0.ML"
    4.13      "ML-Systems/smlnj.ML"
    4.14      "ML-Systems/thread_dummy.ML"
    4.15 -    "ML-Systems/thread_physical_processors.ML"
    4.16      "ML-Systems/universal.ML"
    4.17      "ML-Systems/unsynchronized.ML"
    4.18      "ML-Systems/use_context.ML"
    4.19 @@ -36,13 +36,13 @@
    4.20      "ML-Systems/multithreading_polyml.ML"
    4.21      "ML-Systems/overloading_smlnj.ML"
    4.22      "ML-Systems/polyml.ML"
    4.23 +    "ML-Systems/polyml-5.5.2.ML"
    4.24      "ML-Systems/pp_dummy.ML"
    4.25      "ML-Systems/proper_int.ML"
    4.26      "ML-Systems/single_assignment.ML"
    4.27      "ML-Systems/single_assignment_polyml.ML"
    4.28      "ML-Systems/smlnj.ML"
    4.29      "ML-Systems/thread_dummy.ML"
    4.30 -    "ML-Systems/thread_physical_processors.ML"
    4.31      "ML-Systems/universal.ML"
    4.32      "ML-Systems/unsynchronized.ML"
    4.33      "ML-Systems/use_context.ML"