projects
/
unix-history
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
tags
|
clone url
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fixup ecc code to work
[unix-history]
/
usr
/
src
/
sys
/
kern
/
kern_synch.c
diff --git
a/usr/src/sys/kern/kern_synch.c
b/usr/src/sys/kern/kern_synch.c
index
fb60ea1
..
7bb1a9b
100644
(file)
--- a/
usr/src/sys/kern/kern_synch.c
+++ b/
usr/src/sys/kern/kern_synch.c
@@
-1,4
+1,4
@@
-/* kern_synch.c 4.
2 %G%
*/
+/* kern_synch.c 4.
10 81/03/09
*/
#include "../h/param.h"
#include "../h/systm.h"
#include "../h/param.h"
#include "../h/systm.h"
@@
-10,7
+10,7
@@
#include "../h/vm.h"
#include "../h/pte.h"
#include "../h/inline.h"
#include "../h/vm.h"
#include "../h/pte.h"
#include "../h/inline.h"
-
+#include "../h/mtpr.h"
#define SQSIZE 0100 /* Must be power of 2 */
#define HASH(x) (( (int) x >> 5) & (SQSIZE-1))
#define SQSIZE 0100 /* Must be power of 2 */
#define HASH(x) (( (int) x >> 5) & (SQSIZE-1))
@@
-55,10
+55,6
@@
caddr_t chan;
goto out;
rp->p_stat = SSLEEP;
(void) spl0();
goto out;
rp->p_stat = SSLEEP;
(void) spl0();
- if(runin != 0) {
- runin = 0;
- wakeup((caddr_t)&runin);
- }
swtch();
if(ISSIG(rp))
goto psig;
swtch();
if(ISSIG(rp))
goto psig;
@@
-171,16
+167,12
@@
restart:
if (p->p_stat == SSLEEP) {
/* OPTIMIZED INLINE EXPANSION OF setrun(p) */
p->p_stat = SRUN;
if (p->p_stat == SSLEEP) {
/* OPTIMIZED INLINE EXPANSION OF setrun(p) */
p->p_stat = SRUN;
- if (p->p_flag & SLOAD) {
-#ifndef FASTVAX
- p->p_link = runq;
- runq = p->p_link;
-#else
+ if (p->p_flag & SLOAD)
setrq(p);
setrq(p);
-#endif
- }
- if(p->p_pri < curpri)
+ if(p->p_pri < curpri) {
runrun++;
runrun++;
+ aston();
+ }
if(runout != 0 && (p->p_flag&SLOAD) == 0) {
runout = 0;
wakeup((caddr_t)&runout);
if(runout != 0 && (p->p_flag&SLOAD) == 0) {
runout = 0;
wakeup((caddr_t)&runout);
@@
-194,7
+186,6
@@
restart:
splx(s);
}
splx(s);
}
-#ifdef FASTVAX
/*
* Initialize the (doubly-linked) run queues
* to be empty.
/*
* Initialize the (doubly-linked) run queues
* to be empty.
@@
-206,7
+197,6
@@
rqinit()
for (i = 0; i < NQS; i++)
qs[i].ph_link = qs[i].ph_rlink = (struct proc *)&qs[i];
}
for (i = 0; i < NQS; i++)
qs[i].ph_link = qs[i].ph_rlink = (struct proc *)&qs[i];
}
-#endif
/*
* Set the process running;
/*
* Set the process running;
@@
-239,8
+229,10
@@
register struct proc *p;
if (p->p_flag & SLOAD)
setrq(p);
splx(s);
if (p->p_flag & SLOAD)
setrq(p);
splx(s);
- if(p->p_pri < curpri)
+ if(p->p_pri < curpri)
{
runrun++;
runrun++;
+ aston();
+ }
if(runout != 0 && (p->p_flag&SLOAD) == 0) {
runout = 0;
wakeup((caddr_t)&runout);
if(runout != 0 && (p->p_flag&SLOAD) == 0) {
runout = 0;
wakeup((caddr_t)&runout);
@@
-262,8
+254,10
@@
register struct proc *pp;
p += PUSER + 2*(pp->p_nice - NZERO);
if(p > 127)
p = 127;
p += PUSER + 2*(pp->p_nice - NZERO);
if(p > 127)
p = 127;
- if(p < curpri)
+ if(p < curpri)
{
runrun++;
runrun++;
+ aston();
+ }
pp->p_usrpri = p;
return(p);
}
pp->p_usrpri = p;
return(p);
}
@@
-292,7
+286,7
@@
retry:
mpid = 0;
goto retry;
}
mpid = 0;
goto retry;
}
- for(rpp =
&proc[0]; rpp < &proc[NPROC]
; rpp++) {
+ for(rpp =
proc; rpp < procNPROC
; rpp++) {
if(rpp->p_stat == NULL && p==NULL)
p = rpp;
if (rpp->p_pid==mpid || rpp->p_pgrp==mpid)
if(rpp->p_stat == NULL && p==NULL)
p = rpp;
if (rpp->p_pid==mpid || rpp->p_pgrp==mpid)
@@
-379,7
+373,7
@@
retry:
(void) spl6();
rpp->p_stat = SRUN;
setrq(rpp);
(void) spl6();
rpp->p_stat = SRUN;
setrq(rpp);
- spl0();
+
(void)
spl0();
/* SSWAP NOT NEEDED IN THIS CASE AS u.u_pcb.pcb_sswap SUFFICES */
/* rpp->p_flag |= SSWAP; */
rip->p_flag &= ~SKEEP;
/* SSWAP NOT NEEDED IN THIS CASE AS u.u_pcb.pcb_sswap SUFFICES */
/* rpp->p_flag |= SSWAP; */
rip->p_flag &= ~SKEEP;