patch-2.3.11 linux/fs/proc/array.c
Next file: linux/fs/proc/fd.c
Previous file: linux/fs/open.c
Back to the patch index
Back to the overall index
- Lines: 77
- Date:
Wed Jul 21 09:45:56 1999
- Orig file:
v2.3.10/linux/fs/proc/array.c
- Orig date:
Wed Jun 30 13:38:20 1999
diff -u --recursive --new-file v2.3.10/linux/fs/proc/array.c linux/fs/proc/array.c
@@ -223,7 +223,7 @@
LOAD_INT(a), LOAD_FRAC(a),
LOAD_INT(b), LOAD_FRAC(b),
LOAD_INT(c), LOAD_FRAC(c),
- nr_running, nr_tasks, last_pid);
+ nr_running, nr_threads, last_pid);
}
static int get_kstat(char * buffer)
@@ -312,7 +312,7 @@
unsigned long idle;
uptime = jiffies;
- idle = task[0]->times.tms_utime + task[0]->times.tms_stime;
+ idle = init_tasks[0]->times.tms_utime + init_tasks[0]->times.tms_stime;
/* The formula for the fraction parts really is ((t * 100) / HZ) % 100, but
that would overflow about every five days at HZ == 100.
@@ -495,7 +495,7 @@
int count = 0;
stack_page = (unsigned long)p;
- esp = p->tss.esp;
+ esp = p->thread.esp;
if (!stack_page || esp < stack_page || esp >= 8188+stack_page)
return 0;
/* include/asm-i386/system.h:switch_to() pushes ebp last. */
@@ -742,7 +742,7 @@
{
struct mm_struct * mm = p->mm;
- if (mm && mm != &init_mm) {
+ if (mm) {
struct vm_area_struct * vma = mm->mmap;
unsigned long data = 0, stack = 0;
unsigned long exec = 0, lib = 0;
@@ -868,7 +868,7 @@
return 0;
state = *get_task_state(tsk);
vsize = eip = esp = 0;
- if (tsk->mm && tsk->mm != &init_mm) {
+ if (tsk->mm) {
struct vm_area_struct *vma = tsk->mm->mmap;
while (vma) {
vsize += vma->vm_end - vma->vm_start;
@@ -1025,7 +1025,7 @@
read_unlock(&tasklist_lock); /* FIXME!! This should be done after the last use */
if (!tsk)
return 0;
- if (tsk->mm && tsk->mm != &init_mm) {
+ if (tsk->mm) {
struct vm_area_struct * vma = tsk->mm->mmap;
while (vma) {
@@ -1111,11 +1111,11 @@
if (!p)
goto freepage_out;
- if (!p->mm || p->mm == &init_mm || count == 0)
+ if (!p->mm || count == 0)
goto getlen_out;
/* Check whether the mmaps could change if we sleep */
- volatile_task = (p != current || atomic_read(&p->mm->count) > 1);
+ volatile_task = (p != current || atomic_read(&p->mm->mm_users) > 1);
/* decode f_pos */
lineno = *ppos >> MAPS_LINE_SHIFT;
@@ -1378,8 +1378,6 @@
ok = p->dumpable;
if(!cap_issubset(p->cap_permitted, current->cap_permitted))
ok=0;
- if(!p->mm) /* Scooby scooby doo where are you ? */
- p=NULL;
}
read_unlock(&tasklist_lock);
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)