Home My Page Projects Code Snippets Project Openings SML/NJ
Summary Activity Forums Tracker Lists Tasks Docs Surveys News SCM Files

SCM Repository

[smlnj] Diff of /sml/trunk/src/cm/compile/unix-servers.sml
ViewVC logotype

Diff of /sml/trunk/src/cm/compile/unix-servers.sml

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 455, Wed Oct 27 08:08:25 1999 UTC revision 456, Wed Oct 27 15:09:58 1999 UTC
# Line 127  Line 127 
127                         | _ => loop (line :: report))                         | _ => loop (line :: report))
128              end              end
129    
130          and wait report = (Say.dsay ["Scheduler: ", name,          and wait report = (Concur.wait (Concur.inputReady ins);
                                      " is waiting for slave response.\n"];  
                            Concur.wait (Concur.inputReady ins);  
131                             loop report)                             loop report)
132      in      in
133          loop []          loop []
# Line 151  Line 149 
149              fun loop () = let              fun loop () = let
150                  val line = TextIO.inputLine ins                  val line = TextIO.inputLine ins
151              in              in
152                    Say.dsay ["<- ", name, ": ", line];
153                  case String.tokens Char.isSpace line of                  case String.tokens Char.isSpace line of
154                      ["SLAVE:", "pong"] => ()                      ["SLAVE:", "pong"] => ()
155                    | _ => loop ()                    | _ => loop ()
# Line 209  Line 208 
208      fun reset () = (Concur.reset (); wait_all ())      fun reset () = (Concur.reset (); wait_all ())
209    
210      fun startAll st = let      fun startAll st = let
         val _ = reset ()                (* redundant? *)  
211          val l = !idle          val l = !idle
212          val _ = idle := []          val _ = idle := []
213            val tl = map (fn s => Concur.fork (fn () => st s)) l
214      in      in
215          app st l          app Concur.wait tl
216      end      end
217    
218      fun cm p = let      fun cm p = let
# Line 227  Line 226 
226          startAll st          startAll st
227      end      end
228    
229      fun cmb { archos, dirbase = db } = let      fun cmb { archos, root } = let
230          val d = OS.FileSys.getDir ()          val d = OS.FileSys.getDir ()
231            val f = SrcPath.specOf root
232          fun st s =          fun st s =
233              (Say.vsay ["[(", servName s, "): btcompile for ", archos,              (Say.vsay ["[(", servName s, "): btcompile for ", archos,
234                         ", dirbase = ", db, "]\n"];                         ", root = ", f, "]\n"];
235               send (s, concat ["cmb ", archos, " ",               send (s, concat ["cmb ", archos, " ",
236                                fname (d, s), " ", db, "\n"]);                                fname (d, s), " ", fname (f, s), "\n"]);
237                 ignore (wait_status (s, false)))
238        in
239            startAll st
240        end
241    
242        fun dirbase db = let
243            fun st s =
244                (Say.vsay ["[(", servName s, "): dirbase ", db, "]\n"];
245                 send (s, concat ["dirbase ", db, "\n"]);
246               ignore (wait_status (s, false)))               ignore (wait_status (s, false)))
247      in      in
248          startAll st          startAll st

Legend:
Removed from v.455  
changed lines
  Added in v.456

root@smlnj-gforge.cs.uchicago.edu
ViewVC Help
Powered by ViewVC 1.0.0