(Revision1 - 4 November 2000)
overview system call #2
parameters a0 specified destination
output v1 nearest thread's id
v0 direction to nearest thread, i.e.,
nearest thread is in same clan, an
inner clan, or an outer clan
id_nearest returns tid of nearest thread along the way to intended destination, either the destination tid or that of the first chief along the way. It also returns the direction the message is going, i.e., staying within the same clan, or traveling to an inner or outer clan. If argument is 0, id_nearest returns caller's tid.
on entry a0 destination specified in syscall t8 pointer to high end of caller's tcb
| 0-2 | if argument = 0 return caller's id in v1 |
| 3 | else call nchief to get nearest thread's id and direction |
| 4 |
return to caller with v1 nearest thread's id v0 direction to nearest thread |