patch-2.1.36 linux/kernel/info.c
Next file: linux/kernel/itimer.c
Previous file: linux/kernel/fork.c
Back to the patch index
Back to the overall index
- Lines: 21
- Date:
Tue Apr 22 22:53:52 1997
- Orig file:
v2.1.35/linux/kernel/info.c
- Orig date:
Fri Apr 4 08:52:26 1997
diff -u --recursive --new-file v2.1.35/linux/kernel/info.c linux/kernel/info.c
@@ -23,7 +23,7 @@
memset((char *)&val, 0, sizeof(struct sysinfo));
- lock_kernel();
+ cli();
val.uptime = jiffies / HZ;
val.loads[0] = avenrun[0] << (SI_LOAD_SHIFT - FSHIFT);
@@ -31,10 +31,10 @@
val.loads[2] = avenrun[2] << (SI_LOAD_SHIFT - FSHIFT);
val.procs = nr_tasks-1;
+ sti();
si_meminfo(&val);
si_swapinfo(&val);
- unlock_kernel();
if (copy_to_user(info, &val, sizeof(struct sysinfo)))
return -EFAULT;
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov