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

A quesiton about waiting for an interrupt in an RTOS

Hello all,
I am working on a personal project - an RTOS for a XC167. It is fun and all goes well (still need to cut off some time of a context switch duration though - currently around 118 micro) and I am hoping to write one more system call to allow a task to wait for an interrupt to occur. I was going to allow this type of call:
rtos_interrupt_wait(int32u interrupt)
which puts a task in a seperate queue (out of the ready list) until the interrupt occurs. but in order to catch an intercept, you must always compile your code with a function that declares itself as an ISR, not? that implies that I should write some kind of macro to catches an interrupt, and copy-paste it with different interrupt numbers to handle all possibilities. but is there a better, more code efficient way? I failed to program my interrupt vector table (at least when its beginning was located at memory 0x0).
Thanks in advance,
Tamir

Parents
  • hi,
    thank for your reply! I am going to make my system call a macro that expands the right ISR. the expanded code will then orginize everything with the kernel. I haven't tried it yet, but that seems much easier
    than rewritting the interrupt vector table...I have two simple questions though (out of curiosity):
    can I modify the contents of the interrupt vector table while the program is running? my instinct says
    NO...
    do you know where I can find the source of Monitor166?

    thanks again,
    Tamir

Reply
  • hi,
    thank for your reply! I am going to make my system call a macro that expands the right ISR. the expanded code will then orginize everything with the kernel. I haven't tried it yet, but that seems much easier
    than rewritting the interrupt vector table...I have two simple questions though (out of curiosity):
    can I modify the contents of the interrupt vector table while the program is running? my instinct says
    NO...
    do you know where I can find the source of Monitor166?

    thanks again,
    Tamir

Children
No data