proc_addr() returns address based on location in proc array

- pproc_addr is not neccessary to get the address of a process if we know its
  number

- local proc variables in system calls implementation (sys_task) conflicts with
  the global proc array of all process, therefore the variable were renamed to
  proc_nr as they hold the process number
This commit is contained in:
Tomas Hruby
2009-09-15 09:57:22 +00:00
parent 3615d93383
commit 4fd433694f
7 changed files with 22 additions and 22 deletions

View File

@@ -26,11 +26,11 @@ message *m_ptr; /* pointer to request message */
*/
struct sigcontext sc;
register struct proc *rp;
int proc, r;
int proc_nr, r;
if (! isokendpt(m_ptr->SIG_ENDPT, &proc)) return(EINVAL);
if (iskerneln(proc)) return(EPERM);
rp = proc_addr(proc);
if (! isokendpt(m_ptr->SIG_ENDPT, &proc_nr)) return(EINVAL);
if (iskerneln(proc_nr)) return(EPERM);
rp = proc_addr(proc_nr);
/* Copy in the sigcontext structure. */
if((r=data_copy(m_ptr->SIG_ENDPT, (vir_bytes) m_ptr->SIG_CTXT_PTR,