L 5.10:   Interrupt association part of receive_only

(Revision 0 - 16 October 2000)

 

on entry
t1 &kernel_vars
we know the receive is an attempt to associate or disassociate the receiver with a user-visible available interrupt (for a user-level driver)

11 remove all previous interrupt associations for the caller
12-31 remove caller from the kernel's list of 5 user-visible interrupt handlers (see correspondence list below)
32,110,111 if interrupt association # (wfor tid) is 0, leave with timeout error indication - we just wanted to disassociate
33-111 for each of the 5 possible user interrupt handlers (wfor ids 1-5)
   * if the kernel doesn't already have an interrupt handler
      * set up this thread's interrupt mask to indicate it's the handler
      * store priority and timeslice parameters from the caller into the virtual thread's tcb
         note: there are 5 of these tcbs beginning at PA 4B0000 (see fig .3.1 p.18)
     *  leave with timeout error indicator
   * else (if kernel has a handler) - leave with "non-existing partner" indication
107,110,111 for wfor tid interrupt #s  6 and 7, leave with timeout indication


Correspondence List

user-visible interrupt #
and kernel_vars INT #
hardware interrupt # wfor tid
0 2 1
1 3 2
2 4 3
3 5 4
4 6 5