#if 1 /* ENABLE_USERPRIV && ENABLE_USERIOPL */
if (m_ptr->IOP_ENDPT == SELF) {
- proc_nr = _ENDPOINT_P(caller->p_endpoint);
+ okendpt(caller->p_endpoint, &proc_nr);
} else if(!isokendpt(m_ptr->IOP_ENDPT, &proc_nr))
return(EINVAL);
enable_iop(proc_addr(proc_nr));
* that initiated the device I/O. Kernel processes, of course, are denied.
*/
if (proc_nr_e == SELF)
- proc_nr = _ENDPOINT_P(caller->p_endpoint);
+ okendpt(caller->p_endpoint, &proc_nr);
else
if(!isokendpt(proc_nr_e, &proc_nr))
return(EINVAL);
* forks.
*/
if (! (priv(caller)->s_flags & SYS_PROC)) return(EPERM);
- if(m_ptr->CTL_ENDPT == SELF) proc_nr = _ENDPOINT_P(caller->p_endpoint);
+ if(m_ptr->CTL_ENDPT == SELF) okendpt(caller->p_endpoint, &proc_nr);
else if(!isokendpt(m_ptr->CTL_ENDPT, &proc_nr)) return(EINVAL);
rp = proc_addr(proc_nr);
if (!isokendpt(m_ptr->SCHEDULING_ENDPOINT, &proc_nr))
return EINVAL;
- p = proc_addr(_ENDPOINT_P(m_ptr->SCHEDULING_ENDPOINT));
+ p = proc_addr(proc_nr);
/* Only this process' scheduler can schedule it */
if (caller != p->p_scheduler)
/* Verify process number. */
if (endpt == SELF)
- proc_nr = _ENDPOINT_P(caller->p_endpoint);
+ okendpt(caller->p_endpoint, &proc_nr);
else
if (! isokendpt(endpt, &proc_nr))
return(EINVAL);