L 5.7   Determining real destination: to_chief

(Revision 0 - 14 October 2000)

 

overview
to_chief determines the actual destination of a message if a chief is involved
called if the source and destination have different chiefs

on entry
    t0   reciever tid -  (L5.1 l2)
    v1   sender tid - (L5.1 l3)

0-4 is receiver the sender's chief - if so goto return_to_chief1
5-8,9 is sender the receiver's chief - if so goto return_to_chief1
10 save caller's tid
11 abort message if it was headed to invalid thread - no sense in sending to this thread's chief
12-14 establish register conventions for and call ipc_nchief (enters nchief L6.2 l23 p75) -see below
15,16 set up dtcb to point to new destination thread tcb and load thread state from this tcb into t3
15,16,19 reestablish v1 as holder of stid
17 invert i bit in v0 to be correct for destination thread
v0 holds message dope on received message
for a redirected message i=1 indicates  message came from an inner clan and i=0 indicates message comes from outside the thread's own clan
18 return to k_ipc prologue L5.1 .12

 

  k_ipc/to_chief convention ipc_nchief input convention
sender tid v1 t2
intended destination t0 v1