Featured post
interrupt - Ada - does pragma Attach_Handler() can attach handler with System.Priority'Last priority? -
the next 2 declarations equivalent:
protected type prot_type .... pragma priority(system.priority'last); end; protected type prot_type .... end;
one way of attaching interrupt handler is:
protected type prot_type procedure handler; pragma attach_handler(handler, ...); end; --//attach made @ creation of next object: object : prot_type;
it's legal attachment (it works).
how possible handler has ceiling priority of system.priority
last ? (as far know legal priority in range priority'last+1 .. any_priority'last).
another thing: if add pragma priority(system.priority'last);
protected declaration, program_error exception raised @ elaboration (when attaching handler).
someone can please spread fog?
i manage understand to: http://www.iuma.ulpgc.es/users/jmiranda/gnat-rts/node33.htm
the fact hadler defined in protected ceiling priority system.priority'last managed attached interrupt seems me bug in compiler.
only hendlers defined in protected ceiling priority in interrupt_prioriy'range can attached interrupt.
another important thing - non static protected (i.e declared "protected type ... ") attachment made creation of object of type. object must allocated dynamicly.
yony.
- Get link
- X
- Other Apps
Comments
Post a Comment