#define _SYSTEM 1 #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include "proto.h" #include "util.h" #define SENDSLOTS _NR_PROCS PRIVATE asynmsg_t msgtable[SENDSLOTS]; PRIVATE size_t msgtable_n= SENDSLOTS; PUBLIC int asynsend(dst, mp) endpoint_t dst; message *mp; { int i; unsigned flags; /* Find slot in table */ for (i= 0; i= msgtable_n) vm_panic("asynsend: should resize table", i); msgtable[i].dst= dst; msgtable[i].msg= *mp; msgtable[i].flags= AMF_VALID; /* Has to be last. The kernel * scans this table while we are * sleeping. */ /* Tell the kernel to rescan the table */ return senda(msgtable, msgtable_n); }