L 5.1 Prologue of k_ipc

(Revision 0 - 10 October 2000)

 

Overview:    k_ipc has the code for complete short IPC (both send and receive) - the part that's done in the sending thread's context.
                    prologue has various validity checks

On entry:    sp is pointing at top of exception frame - set at l22 L4.3 (general exception handler) geh
                  t8 dtcb set at k24 geh

Called from:    l23 geh

0 no send part - goto code optimized  for receiving
1-4 get info on source and destination threads
5-8 check whether source and destination threads are part of same clan
10,12 return_to_chief1: part of same clan, redirection not needed
return_to_chief2: different clans, redirection needed
9 initially set return code
11 if user supplied invalid receiver thread goto invalid_dest
14,15 if long ipc - goto ipc_long
4,13,16-21 if message can't be delivered now goto pending
this has to do with who we are sending our message to
message can't be delivered if:
   destination thread is not waiting
   destination thread is waiting but
      is not waiting for a message from anyone (reply and wait server operation)
      is not waiting for a message from this thread
18,22 if message can be delivered now - goto deliver