make allproc be volatile, and cast things accordingly.
suggested by torek, because CSRG had problems with reordering of assignments to allproc leading to strange panics from kernels compiled with gcc2...
This commit is contained in:
parent
a3b397dd18
commit
9c32bc786a
@ -1 +1 @@
|
||||
revision 1.26 intentionally removed
|
||||
revision 1.27 intentionally removed
|
||||
|
@ -1 +1 @@
|
||||
revision 1.5 intentionally removed
|
||||
revision 1.6 intentionally removed
|
||||
|
@ -31,7 +31,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* from: @(#)kern_kinfo.c 7.17 (Berkeley) 6/26/91
|
||||
* $Id: kern_kinfo.c,v 1.8 1993/08/07 08:03:29 cgd Exp $
|
||||
* $Id: kern_kinfo.c,v 1.9 1993/09/15 22:30:34 cgd Exp $
|
||||
*/
|
||||
|
||||
#include "param.h"
|
||||
@ -153,7 +153,7 @@ kinfo_doproc(op, where, acopysize, arg, aneeded)
|
||||
if (where != NULL)
|
||||
buflen = *acopysize;
|
||||
|
||||
p = allproc;
|
||||
p = (struct proc *)allproc;
|
||||
doingzomb = 0;
|
||||
again:
|
||||
for (; p != NULL; p = p->p_nxt) {
|
||||
|
@ -31,7 +31,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* from: @(#)kern_ktrace.c 7.15 (Berkeley) 6/21/91
|
||||
* $Id: kern_ktrace.c,v 1.5 1993/07/13 22:13:22 cgd Exp $
|
||||
* $Id: kern_ktrace.c,v 1.6 1993/09/15 22:30:35 cgd Exp $
|
||||
*/
|
||||
|
||||
#include "param.h"
|
||||
@ -225,7 +225,7 @@ ktrace(curp, uap, retval)
|
||||
* Clear all uses of the tracefile
|
||||
*/
|
||||
if (ops == KTROP_CLEARFILE) {
|
||||
for (p = allproc; p != NULL; p = p->p_nxt) {
|
||||
for (p = (struct proc *)allproc; p != NULL; p = p->p_nxt) {
|
||||
if (p->p_tracep == vp) {
|
||||
if (ktrcanset(curp, p)) {
|
||||
p->p_tracep = NULL;
|
||||
@ -395,7 +395,7 @@ ktrwrite(vp, kth)
|
||||
*/
|
||||
log(LOG_NOTICE, "ktrace write failed, errno %d, tracing stopped\n",
|
||||
error);
|
||||
for (p = allproc; p != NULL; p = p->p_nxt) {
|
||||
for (p = (struct proc *)allproc; p != NULL; p = p->p_nxt) {
|
||||
if (p->p_tracep == vp) {
|
||||
p->p_tracep = NULL;
|
||||
p->p_traceflag = 0;
|
||||
|
@ -1 +1 @@
|
||||
revision 1.9 intentionally removed
|
||||
revision 1.10 intentionally removed
|
||||
|
@ -1 +1 @@
|
||||
revision 1.8 intentionally removed
|
||||
revision 1.9 intentionally removed
|
||||
|
@ -1 +1 @@
|
||||
revision 1.10 intentionally removed
|
||||
revision 1.11 intentionally removed
|
||||
|
@ -1 +1 @@
|
||||
revision 1.6 intentionally removed
|
||||
revision 1.7 intentionally removed
|
||||
|
@ -309,7 +309,7 @@ loop:
|
||||
#endif
|
||||
pp = NULL;
|
||||
ppri = INT_MIN;
|
||||
for (p = allproc; p != NULL; p = p->p_nxt)
|
||||
for (p = (struct proc *)allproc; p != NULL; p = p->p_nxt)
|
||||
if (p->p_stat == SRUN && (p->p_flag & SLOAD) == 0) {
|
||||
pri = p->p_time + p->p_slptime - p->p_nice * 8;
|
||||
if (pri > ppri) {
|
||||
@ -397,7 +397,7 @@ swapout_threads()
|
||||
#endif
|
||||
outp = outp2 = NULL;
|
||||
outpri = outpri2 = 0;
|
||||
for (p = allproc; p != NULL; p = p->p_nxt) {
|
||||
for (p = (struct proc *)allproc; p != NULL; p = p->p_nxt) {
|
||||
if (!swappable(p))
|
||||
continue;
|
||||
switch (p->p_stat) {
|
||||
|
@ -31,7 +31,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* from: @(#)vm_meter.c 7.11 (Berkeley) 4/20/91
|
||||
* $Id: vm_meter.c,v 1.4 1993/08/27 23:47:12 brezak Exp $
|
||||
* $Id: vm_meter.c,v 1.5 1993/09/15 22:31:07 cgd Exp $
|
||||
*/
|
||||
|
||||
#include "param.h"
|
||||
@ -75,7 +75,7 @@ vmtotal()
|
||||
total.t_pw = 0;
|
||||
total.t_sl = 0;
|
||||
total.t_sw = 0;
|
||||
for (p = allproc; p != NULL; p = p->p_nxt) {
|
||||
for (p = (struct proc *)allproc; p != NULL; p = p->p_nxt) {
|
||||
if (p->p_flag & SSYS)
|
||||
continue;
|
||||
if (p->p_stat) {
|
||||
|
Loading…
Reference in New Issue
Block a user