iskernelp() and isuserp() test pointers
- we may test even not fully initialized entries, e.g. during boot crash - is we know the process number we should use iskerneln and isusern
This commit is contained in:
parent
78793f4f38
commit
71077d1228
1 changed files with 2 additions and 2 deletions
|
@ -204,9 +204,9 @@ struct proc {
|
|||
#define isokprocn(n) ((unsigned) ((n) + NR_TASKS) < NR_PROCS + NR_TASKS)
|
||||
#define isemptyn(n) isemptyp(proc_addr(n))
|
||||
#define isemptyp(p) ((p)->p_rts_flags == SLOT_FREE)
|
||||
#define iskernelp(p) iskerneln((p)->p_nr)
|
||||
#define iskernelp(p) ((p) < BEG_USER_ADDR)
|
||||
#define iskerneln(n) ((n) < 0)
|
||||
#define isuserp(p) isusern((p)->p_nr)
|
||||
#define isuserp(p) isusern((p) >= BEG_USER_ADDR)
|
||||
#define isusern(n) ((n) >= 0)
|
||||
|
||||
/* The process table and pointers to process table slots. The pointers allow
|
||||
|
|
Loading…
Reference in a new issue