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/branches/idlbasis-devel/src/system/Basis/Implementation/Posix/posix-io.sml
ViewVC logotype

Diff of /sml/branches/idlbasis-devel/src/system/Basis/Implementation/Posix/posix-io.sml

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

revision 866, Mon Jul 2 16:33:10 2001 UTC revision 867, Mon Jul 2 20:14:11 2001 UTC
# Line 121  Line 121 
121          fun fromWord w = FDF w          fun fromWord w = FDF w
122          fun toWord (FDF w) = w          fun toWord (FDF w) = w
123    
124            val all = FDF (SysWord.notb 0w0)
125    
126          fun flags ms = FDF(List.foldl (fn (FDF m,acc) => m ++ acc) 0w0 ms)          fun flags ms = FDF(List.foldl (fn (FDF m,acc) => m ++ acc) 0w0 ms)
127            fun intersect ms = FDF(List.foldl (fn (FDF m,acc) => m & acc)
128                                              (SysWord.notb 0w0) ms)
129            fun clear (FDF m, FDF m') = FDF (SysWord.notb m & m')
130          fun anySet (FDF m, FDF m') = (m & m') <> 0w0          fun anySet (FDF m, FDF m') = (m & m') <> 0w0
131          fun allSet (FDF m, FDF m') = (m & m') = m          fun allSet (FDF m, FDF m') = (m & m') = m
132    
# Line 135  Line 140 
140          fun fromWord w = FS w          fun fromWord w = FS w
141          fun toWord (FS w) = w          fun toWord (FS w) = w
142    
143            val all = FS (SysWord.notb 0w0) (* too much?? *)
144    
145          fun flags ms = FS(List.foldl (fn (FS m,acc) => m ++ acc) 0w0 ms)          fun flags ms = FS(List.foldl (fn (FS m,acc) => m ++ acc) 0w0 ms)
146            fun intersect ms = FS(List.foldl (fn (FS m,acc) => m & acc)
147                                             (SysWord.notb 0w0) ms)
148            fun clear (FS m, FS m') = FS (SysWord.notb m & m')
149          fun anySet (FS m, FS m') = (m & m') <> 0w0          fun anySet (FS m, FS m') = (m & m') <> 0w0
150          fun allSet (FS m, FS m') = (m & m') = m          fun allSet (FS m, FS m') = (m & m') = m
151    
# Line 173  Line 183 
183               l_pid : pid option               l_pid : pid option
184             }             }
185    
186          fun flock fv = FLOCK fv          fun flock { ltype, whence, start, len, pid } =
187                FLOCK { l_type = ltype, l_whence = whence, l_start = start,
188                        l_len = len, l_pid = pid }
189          fun ltype (FLOCK{l_type,...}) = l_type          fun ltype (FLOCK{l_type,...}) = l_type
190          fun whence (FLOCK{l_whence,...}) = l_whence          fun whence (FLOCK{l_whence,...}) = l_whence
191          fun start (FLOCK{l_start,...}) = l_start          fun start (FLOCK{l_start,...}) = l_start
# Line 227  Line 239 
239      val fsync' : s_int -> unit = cfun "fsync"      val fsync' : s_int -> unit = cfun "fsync"
240      fun fsync fd = fsync' (FS.intOf fd)      fun fsync fd = fsync' (FS.intOf fd)
241    
242        fun mkBinReader _ = raise Fail "mkBinReader not implemented"
243        fun mkTextReader _ = raise Fail "mkTextReader not implemented"
244        fun mkBinWriter _ = raise Fail "mkBinWriter not implemented"
245        fun mkTextWriter _ = raise Fail "mkTextWriter not implemented"
246    
247    end (* structure POSIX_IO *)    end (* structure POSIX_IO *)
248  end  end
   

Legend:
Removed from v.866  
changed lines
  Added in v.867

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