[ ECLiPSe Event built-in.|Group Index| Full Index]

get_interrupt_handler(+Number, ?PredSpec, ?Module)

Succeeds if PredSpec unifies with the specification of the current handler for interrupt Number and Module unifies with its home module.

+Number
Integer.
?PredSpec
Term which unifies with atom/integer.
?Module
Atom or variable.

Description

Provided Number is a valid interrupt identifier, unifies PredSpec with the specification (i.e. a term of the form name/arity) of the current handler for interrupt Number, and Module with the module in which it is defined.

The interrupts which exist are machine dependent. The interrupts which can be caught or trapped are implementation defined.

Fail Conditions

Fails if PredSpec or Module do not unify with the current handler for interrupt Number.

Resatisfiable

No.

Exceptions

(4) Instantiation fault
Number is not instantiated.
(5) Type error
Number is not an integer.
(5) Type error
PredSpec does not unify with atom/integer.
(6) Range error
Number is not a valid interrupt number.

Examples


Success:
      [eclipse]: get_interrupt_handler(18,M,N).
      M = pause/0
      N = sepia_kernel
      yes.
      [eclipse]: set_interrupt_handler(18,true/0), interrupt(18),
      > get_interrupt_handler(18,true/0,sepia_kernel).
      yes.
Fail:
      get_interrupt_handler(16, true/0, sepia_kernel).
Error:
      get_interrupt_handler(N,true/0,sepia_kernel).   (Error 4).
      get_interrupt_handler(5.0,true/0,sepia_kernel). (Error 5).
      get_interrupt_handler(-1,X,sepia_kernel).       (Error 6).


See Also

current_interrupt / 2, set_interrupt_handler / 2, get_interrupt_flag / 2