This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

SVC handlers

Hi Experts,

The RTX code contains SVC handlers named with different names. How this can be best made use of ?

Why the option to select numbering of different svc handlers like _svc(0) ....  __svc(n) ?

Regards,

Techguyz

Parents
  • The number is just a parameter that the handler can investigate.

    Normally, the parameter is used for identifying which function you want to use.

    -But the parameter can be anything the designer of the handler wants.

    When the SVC instruction is executed, it triggers an interrupt (software interrupt), thus a handler is needed.

    The handler is executed in supervisor mode, but as soon as the handler returns, your code continues in user mode.

    Some operating systems would use the SVC handler as the interface to system functions.

    Other operating systems would load linkable files and use the resolved symbols to call functions; such functions could make use of the SVC instruction to execute code in privileged mode.

Reply
  • The number is just a parameter that the handler can investigate.

    Normally, the parameter is used for identifying which function you want to use.

    -But the parameter can be anything the designer of the handler wants.

    When the SVC instruction is executed, it triggers an interrupt (software interrupt), thus a handler is needed.

    The handler is executed in supervisor mode, but as soon as the handler returns, your code continues in user mode.

    Some operating systems would use the SVC handler as the interface to system functions.

    Other operating systems would load linkable files and use the resolved symbols to call functions; such functions could make use of the SVC instruction to execute code in privileged mode.

Children
No data