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/system/Basis/Implementation/NJ/internal-signals.sml
ViewVC logotype

Diff of /sml/trunk/src/system/Basis/Implementation/NJ/internal-signals.sml

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

revision 841, Fri Jun 15 21:38:20 2001 UTC revision 842, Tue Jun 19 21:24:35 2001 UTC
# Line 278  Line 278 
278    (* Here is the ML handler that gets invoked by the run-time system.    (* Here is the ML handler that gets invoked by the run-time system.
279     * It is responsible for dispatching the appropriate ML handler.     * It is responsible for dispatching the appropriate ML handler.
280     *)     *)
281      fun sigHandler (code, count, resume_k) = (      fun sigHandler (code, count, resume_k) =
282            case (Array.sub(!sigTbl, code))          (case (Array.sub(!sigTbl, code))
283              of (SOME{act=HANDLER handler, mask=0, signal}) =>              of (SOME{act=HANDLER handler, mask=0, signal}) =>
284                    handler(signal, count, resume_k)                    handler(signal, count, resume_k)
285  (*DEBUG  (*DEBUG
286               | _ => raise Fail "inconsistent internal signal state"               | _ => raise Fail "inconsistent internal signal state"
287  DEBUG*)  DEBUG*)
288  | info => let val act = (case info             | info => let
289                     val act = (case info
290  of NONE => "NONE"  of NONE => "NONE"
291   | SOME{act=IGNORE, ...} => "IGNORE"   | SOME{act=IGNORE, ...} => "IGNORE"
292   | SOME{act=DEFAULT, ...} => "DEFAULT"   | SOME{act=DEFAULT, ...} => "DEFAULT"
293                                  | SOME{act=HANDLER _, mask, ... } =>
294                                    concat ["HANDLER(mask=",Int.toString mask,
295                                            "<>0)"]
296  (* end case *))  (* end case *))
297  val msg = concat["inconsistent state ", act, " for signal ", Int.toString code]                   val msg = concat["inconsistent state ", act,
298  in raise Fail msg end                                    " for signal ", Int.toString code]
299                 in raise Fail msg
300                 end
301            (* end case *))            (* end case *))
302    
303    (* Install the root handler *)    (* Install the root handler *)

Legend:
Removed from v.841  
changed lines
  Added in v.842

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