*/
#define ELOCKED (_SIGN 101) /* can't send message due to deadlock */
#define EBADCALL (_SIGN 102) /* illegal system call number */
-#define EBADSRCDST (_SIGN 103) /* bad source or destination process */
#define ECALLDENIED (_SIGN 104) /* no permission for system call */
#define EDEADSRCDST (_SIGN 105) /* source or destination is not alive */
#define ENOTREADY (_SIGN 106) /* source or destination is not ready */
#define ETRAPDENIED (_SIGN 110) /* IPC trap not allowed */
#define EDONTREPLY (_SIGN 201) /* pseudo-code: don't send a reply */
+/* The following are non-POSIX server responses */
+#define EBADEPT (_SIGN 301) /* specified endpoint is bad */
+#define EDEADEPT (_SIGN 302) /* specified endpoint is not alive */
+
#endif /* _ERRNO_H */
driver_e = driver_endpoints[(dev >> MAJOR) & BYTE].driver_e;
/* See if driver is roughly valid. */
- if (driver_e == NONE) return(EDEADSRCDST);
+ if (driver_e == NONE) return(EDEADEPT);
/* The io vector copying relies on this I/O being for FS itself. */
if(proc_e != SELF_E) {
/* Call the task. */
r = sendrec(driver_e, &m);
- if(r == OK && m.REP_STATUS == ERESTART) r = EDEADSRCDST;
+ if(r == OK && m.REP_STATUS == ERESTART) r = EDEADEPT;
/* As block I/O never SUSPENDs, safe cleanup must be done whether
* the I/O succeeded or not. */
* - VFS sends the new driver endp for the FS proc and the request again
*/
if (r != OK) {
- if (r == EDEADSRCDST) {
+ if (r == EDEADSRCDST || r == EDEADEPT) {
printf("ISOFS(%d) dead driver %d\n", SELF_E, driver_e);
driver_endpoints[(dev >> MAJOR) & BYTE].driver_e = NONE;
return(r);
proc_e = mess_ptr->IO_ENDPT;
r = sendrec(task_nr, mess_ptr);
- if(r == OK && mess_ptr->REP_STATUS == ERESTART) r = EDEADSRCDST;
+ if(r == OK && mess_ptr->REP_STATUS == ERESTART) r = EDEADEPT;
if (r != OK) {
- if (r == EDEADSRCDST) {
+ if (r == EDEADSRCDST || r == EDEADEPT) {
printf("fs: dead driver %d\n", task_nr);
panic("should handle crashed drivers");
/* dmap_unmap_by_endpt(task_nr); */
/* See if driver is roughly valid. */
if (driver_e == NONE) {
printf("MFS(%d) block_dev_io: no driver for dev %x\n", SELF_E, dev);
- return(EDEADSRCDST);
+ return(EDEADEPT);
}
/* The io vector copying relies on this I/O being for FS itself. */
/* Call the task. */
r = sendrec(driver_e, &m);
- if(r == OK && m.REP_STATUS == ERESTART) r = EDEADSRCDST;
+ if(r == OK && m.REP_STATUS == ERESTART) r = EDEADEPT;
/* As block I/O never SUSPENDs, safe cleanup must be done whether
* the I/O succeeded or not. */
* - VFS sends the new driver endp for the FS proc and the request again
*/
if (r != OK) {
- if (r == EDEADSRCDST) {
+ if (r == EDEADSRCDST || r == EDEADEPT) {
printf("MFS(%d) dead driver %d\n", SELF_E, driver_e);
driver_endpoints[major(dev)].driver_e = NONE;
return(r);
r = sendrec(task_nr, mess_ptr);
if(r == OK && mess_ptr->REP_STATUS == ERESTART)
- r = EDEADSRCDST;
+ r = EDEADEPT;
if (r != OK) {
- if (r == EDEADSRCDST) {
+ if (r == EDEADSRCDST || r == EDEADEPT) {
printf("fs: dead driver %d\n", task_nr);
panic("should handle crashed drivers");
return(r);
if(pm_isokendpt(proc_nr_e, &proc_nr) != OK || proc_nr < 0) {
printf("PM: process_ksig: %d?? not ok\n", proc_nr_e);
- return EDEADSRCDST; /* process is gone. */
+ return EDEADEPT; /* process is gone. */
}
rmp = &mproc[proc_nr];
if ((rmp->mp_flags & (IN_USE | EXITING)) != IN_USE) {
#if 0
printf("PM: process_ksig: %d?? exiting / not in use\n", proc_nr_e);
#endif
- return EDEADSRCDST; /* process is gone. */
+ return EDEADEPT; /* process is gone. */
}
proc_id = rmp->mp_pid;
mp = &mproc[0]; /* pretend signals are from PM */
return OK; /* signal has been delivered */
}
else {
- return EDEADSRCDST; /* process is gone */
+ return EDEADEPT; /* process is gone */
}
}
if(*proc < -NR_TASKS || *proc >= NR_PROCS)
return EINVAL;
if(*proc >= 0 && endpoint != mproc[*proc].mp_endpoint)
- return EDEADSRCDST;
+ return EDEADEPT;
if(*proc >= 0 && !(mproc[*proc].mp_flags & IN_USE))
- return EDEADSRCDST;
+ return EDEADEPT;
return OK;
}
/* Don't bother if a termination signal has already been processed. */
if((rp->r_flags & RS_TERMINATED) && !(rp->r_flags & RS_EXITING)) {
- return EDEADSRCDST; /* process is gone */
+ return EDEADEPT; /* process is gone */
}
/* Ignore external signals for inactive service instances. */
rp->r_flags |= RS_TERMINATED;
terminate_service(rp);
- return EDEADSRCDST; /* process is now gone */
+ return EDEADEPT; /* process is now gone */
}
/* Translate every non-termination signal into a message. */
}
/* See if a late reply has to be sent. */
- r = (rp->r_caller_request == RS_DOWN ? OK : EDEADSRCDST);
+ r = (rp->r_caller_request == RS_DOWN ? OK : EDEADEPT);
late_reply(rp, r);
/* Unpublish the service. */
if (sched_isokendpt(m_ptr->m_source, &proc_nr_n) != OK) {
printf("SCHED: WARNING: got an invalid endpoint in OOQ msg %u.\n",
m_ptr->m_source);
- return EBADSRCDST;
+ return EBADEPT;
}
rmp = &schedproc[proc_nr_n];
if (sched_isokendpt(m_ptr->SCHEDULING_ENDPOINT, &proc_nr_n) != OK) {
printf("SCHED: WARNING: got an invalid endpoint in OOQ msg %u.\n",
m_ptr->SCHEDULING_ENDPOINT);
- return EBADSRCDST;
+ return EBADEPT;
}
rmp = &schedproc[proc_nr_n];
if (sched_isokendpt(m_ptr->SCHEDULING_ENDPOINT, &proc_nr_n) != OK) {
printf("SCHED: WARNING: got an invalid endpoint in OOQ msg %u.\n",
m_ptr->SCHEDULING_ENDPOINT);
- return EBADSRCDST;
+ return EBADEPT;
}
rmp = &schedproc[proc_nr_n];
{
*proc = _ENDPOINT_P(endpoint);
if (*proc < 0)
- return (EBADSRCDST); /* Don't schedule tasks */
+ return (EBADEPT); /* Don't schedule tasks */
if(*proc >= NR_PROCS)
return (EINVAL);
if(endpoint != schedproc[*proc].endpoint)
- return (EDEADSRCDST);
+ return (EDEADEPT);
if(!(schedproc[*proc].flags & IN_USE))
- return (EDEADSRCDST);
+ return (EDEADEPT);
return (OK);
}
{
*proc = _ENDPOINT_P(endpoint);
if (*proc < 0)
- return (EBADSRCDST); /* Don't schedule tasks */
+ return (EBADEPT); /* Don't schedule tasks */
if(*proc >= NR_PROCS)
return (EINVAL);
if(schedproc[*proc].flags & IN_USE)
- return (EDEADSRCDST);
+ return (EDEADEPT);
return (OK);
}
int r;
st.m_type = DEV_STATUS;
r = sendrec(m->m_source, &st);
- if(r == OK && st.REP_STATUS == ERESTART) r = EDEADSRCDST;
+ if(r == OK && st.REP_STATUS == ERESTART) r = EDEADEPT;
if (r != OK) {
printf("DEV_STATUS failed to %d: %d\n", m->m_source, r);
- if (r == EDEADSRCDST) return;
+ if (r == EDEADSRCDST || r == EDEADEPT) return;
panic("couldn't sendrec for DEV_STATUS: %d", r);
}
proc_e = mess_ptr->IO_ENDPT;
r = sendrec(task_nr, mess_ptr);
- if(r == OK && mess_ptr->REP_STATUS == ERESTART) r = EDEADSRCDST;
+ if(r == OK && mess_ptr->REP_STATUS == ERESTART) r = EDEADEPT;
if (r != OK) {
- if (r == EDEADSRCDST) {
+ if (r == EDEADSRCDST || r == EDEADEPT) {
printf("fs: dead driver %d\n", task_nr);
dmap_unmap_by_endpt(task_nr);
return(r);
if(failed && fatal)
panic("isokendpt_f failed");
- return(failed ? EDEADSRCDST : OK);
+ return(failed ? EDEADEPT : OK);
}
if(*proc < 0 || *proc >= NR_PROCS)
return EINVAL;
if(*proc >= 0 && endpoint != vmproc[*proc].vm_endpoint)
- return EDEADSRCDST;
+ return EDEADEPT;
if(*proc >= 0 && !(vmproc[*proc].vm_flags & VMF_INUSE))
- return EDEADSRCDST;
+ return EDEADEPT;
return OK;
}