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/concur/unix-servers.sml
ViewVC logotype

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

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

revision 484, Thu Nov 18 08:46:16 1999 UTC revision 485, Thu Nov 18 08:54:14 1999 UTC
# Line 38  Line 38 
38    
39      local      local
40          val nservers = ref 0          val nservers = ref 0
41          val all = ref (IntRedBlackMap.empty: server IntRedBlackMap.map)          val all = ref (IntMap.empty: server IntMap.map)
42      in      in
43          fun noServers () = !nservers = 0          fun noServers () = !nservers = 0
44          fun allServers () = IntRedBlackMap.listItems (!all)          fun allServers () = IntMap.listItems (!all)
45          fun addServer s = let          fun addServer s = let
46              val ns = !nservers              val ns = !nservers
47          in          in
48              nservers := ns + 1;              nservers := ns + 1;
49              all := IntRedBlackMap.insert (!all, servId s, s)              all := IntMap.insert (!all, servId s, s)
50          end          end
51          fun delServer s = let          fun delServer s = let
52              val ns = !nservers - 1              val ns = !nservers - 1
53          in          in
54              all := #1 (IntRedBlackMap.remove (!all, servId s));              all := #1 (IntMap.remove (!all, servId s));
55              nservers := ns              nservers := ns
56          end          end
57      end      end

Legend:
Removed from v.484  
changed lines
  Added in v.485

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