Ejemplo n.º 1
0
 public static void op1_disable_interrupts(SObject arg)
 {
     if (Reg.interruptsEnabled)
     {
         Reg.interruptsEnabled = false;
         Reg.Result            = Factory.makeFixnum((int)Reg.timer);
     }
     else
     {
         Reg.Result = Factory.makeBoolean(false);
     }
     Exn.checkSignals();
 }
Ejemplo n.º 2
0
        /* Misc */
        /* ---- */

        public static void op1_enable_interrupts(SObject arg)
        {
            Ops.expect1(arg.isFixnum(), arg, Constants.EX_EINTR);
            int time = ((SFixnum)arg).value;

            if (time > 0)
            {
                Reg.interruptsEnabled = true;
                Reg.timer             = time;
            }
            else
            {
                Exn.fault(Constants.EX_EINTR,
                          "enable-interrupts: expected positive value");
            }
            Reg.Result = Factory.Unspecified;
            Exn.checkSignals();
        }