#define NIL_PROC ((struct proc *) 0)
#define NIL_SYS_PROC ((struct proc *) 1)
#define cproc_addr(n) (&(proc + NR_TASKS)[(n)])
-#define proc_addr(n) (pproc_addr + NR_TASKS)[(n)]
+#define proc_addr(n) (&(proc[NR_TASKS + (n)]))
#define proc_nr(p) ((p)->p_nr)
#define isokprocn(n) ((unsigned) ((n) + NR_TASKS) < NR_PROCS + NR_TASKS)
* signal it got with SYS_GETKSIG.
*/
register struct proc *rp;
- int proc;
+ int proc_nr;
/* Get process pointer and verify that it had signals pending. If the
* process is already dead its flags will be reset.
*/
- if(!isokendpt(m_ptr->SIG_ENDPT, &proc))
+ if(!isokendpt(m_ptr->SIG_ENDPT, &proc_nr))
return EINVAL;
- rp = proc_addr(proc);
+ rp = proc_addr(proc_nr);
if (!RTS_ISSET(rp, SIG_PENDING)) return(EINVAL);
/* PM has finished one kernel signal. Perhaps process is ready now? */
register struct proc *rp;
phys_bytes phys_name;
char *np;
- int proc;
+ int proc_nr;
- if(!isokendpt(m_ptr->PR_ENDPT, &proc))
+ if(!isokendpt(m_ptr->PR_ENDPT, &proc_nr))
return EINVAL;
- rp = proc_addr(proc);
+ rp = proc_addr(proc_nr);
/* Save command name for debugging, ps(1) output, etc. */
if(data_copy(who_e, (vir_bytes) m_ptr->PR_NAME_PTR,
* interrupts are transformed into messages to a driver. The IRQ line will be
* reenabled if the policy says so.
*/
- int proc;
+ int proc_nr;
/* As a side-effect, the interrupt handler gathers random information by
* timestamping the interrupt events. This is used for /dev/random.
* If it's dead, this should never happen, as processes that die
* automatically get their interrupt hooks unhooked.
*/
- if(!isokendpt(hook->proc_nr_e, &proc))
+ if(!isokendpt(hook->proc_nr_e, &proc_nr))
minix_panic("invalid interrupt handler", hook->proc_nr_e);
/* Add a bit for this interrupt to the process' pending interrupts. When
* sending the notification message, this bit map will be magically set
* as an argument.
*/
- priv(proc_addr(proc))->s_int_pending |= (1 << hook->notify_id);
+ priv(proc_addr(proc_nr))->s_int_pending |= (1 << hook->notify_id);
/* Build notification message and return. */
lock_notify(HARDWARE, hook->proc_nr_e);
register struct proc *rp; /* process whose map is to be loaded */
struct mem_map *map_ptr; /* virtual address of map inside caller */
phys_bytes src_phys; /* physical address of map at the */
- int proc;
+ int proc_nr;
map_ptr = (struct mem_map *) m_ptr->PR_MEM_PTR;
- if (! isokendpt(m_ptr->PR_ENDPT, &proc)) return(EINVAL);
- if (iskerneln(proc)) return(EPERM);
- rp = proc_addr(proc);
+ if (! isokendpt(m_ptr->PR_ENDPT, &proc_nr)) return(EINVAL);
+ if (iskerneln(proc_nr)) return(EPERM);
+ rp = proc_addr(proc_nr);
return newmap(rp, map_ptr);
}
*/
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,
register struct proc *rp;
struct sigcontext sc, *scp;
struct sigframe fr, *frp;
- int proc, r;
+ int proc_nr, r;
phys_bytes ph;
- 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);
ph = umap_local(proc_addr(who_p), D, (vir_bytes) m_ptr->SIG_CTXT_PTR, sizeof(struct sigmsg));
if(!ph) return EFAULT;