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
  • Hi Jensbauer,

    Thanks for the reply.

    So you mean the jump from user mode to supervisor mode is performed through this numbering ?

    Is it similar to how system call implemented in the OS including all OS functionalities and task switching operations ?

    Regards,

    Techguyz

Reply
  • Hi Jensbauer,

    Thanks for the reply.

    So you mean the jump from user mode to supervisor mode is performed through this numbering ?

    Is it similar to how system call implemented in the OS including all OS functionalities and task switching operations ?

    Regards,

    Techguyz

Children
  • 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.