SCCS-vsn: sys/vax/vax/locore.s 4.44
SCCS-vsn: sys/kern/tty_subr.c 4.11
SCCS-vsn: sys/kern/kern_synch.c 4.13
SCCS-vsn: sys/vm/vm_meter.c 4.5
-/* kern_synch.c 4.12 81/04/15 */
+/* kern_synch.c 4.13 81/04/17 */
#include "../h/param.h"
#include "../h/systm.h"
#include "../h/param.h"
#include "../h/systm.h"
- if(runout != 0 && (p->p_flag&SLOAD) == 0) {
- runout = 0;
- wakeup((caddr_t)&runout);
+ if ((p->p_flag&SLOAD) == 0) {
+ if (runout != 0) {
+ runout = 0;
+ wakeup((caddr_t)&runout);
+ }
+ wantin++;
}
/* END INLINE EXPANSION */
goto restart;
}
/* END INLINE EXPANSION */
goto restart;
- if(runout != 0 && (p->p_flag&SLOAD) == 0) {
- runout = 0;
- wakeup((caddr_t)&runout);
+ if ((p->p_flag&SLOAD) == 0) {
+ if(runout != 0) {
+ runout = 0;
+ wakeup((caddr_t)&runout);
+ }
+ wantin++;
-/* tty_subr.c 4.10 81/03/09 */
+/* tty_subr.c 4.11 81/04/17 */
#include "../h/param.h"
#include "../h/systm.h"
#include "../h/param.h"
#include "../h/systm.h"
register struct cblock *bp;
register int c, s;
register struct cblock *bp;
register int c, s;
if (p->c_cc <= 0) {
c = -1;
p->c_cc = 0;
if (p->c_cc <= 0) {
c = -1;
p->c_cc = 0;
if (q->c_cc <= 0) {
q->c_cc = 0;
q->c_cf = q->c_cl = NULL;
if (q->c_cc <= 0) {
q->c_cc = 0;
q->c_cf = q->c_cl = NULL;
if (q->c_cc <= 0) {
cc = -q->c_cc;
goto out;
if (q->c_cc <= 0) {
cc = -q->c_cc;
goto out;
if (q->c_cc < 0) {
printf("neg q flush\n");
goto out;
if (q->c_cc < 0) {
printf("neg q flush\n");
goto out;
register char *cp;
register s;
register char *cp;
register s;
if ((cp = p->c_cl) == NULL || p->c_cc < 0 ) {
if ((bp = cfreelist) == NULL) {
splx(s);
if ((cp = p->c_cl) == NULL || p->c_cc < 0 ) {
if ((bp = cfreelist) == NULL) {
splx(s);
if ((cq = q->c_cl) == NULL || q->c_cc < 0) {
if ((bp = cfreelist) == NULL)
goto out;
if ((cq = q->c_cl) == NULL || q->c_cc < 0) {
if ((bp = cfreelist) == NULL)
goto out;
register int c, s;
struct cblock *obp;
register int c, s;
struct cblock *obp;
if (p->c_cc <= 0)
c = -1;
else {
if (p->c_cc <= 0)
c = -1;
else {
if (cfreelist==NULL) {
splx(s);
return(-1);
if (cfreelist==NULL) {
splx(s);
return(-1);
-/* locore.s 4.43 81/04/15 */
+/* locore.s 4.44 81/04/17 */
#include "../h/mtpr.h"
#include "../h/trap.h"
#include "../h/mtpr.h"
#include "../h/trap.h"
*/
_copyseg: .globl _copyseg
.word 0x0
*/
_copyseg: .globl _copyseg
.word 0x0
- mfpr $IPL,r0 # get current pri level
- mtpr $HIGH,$IPL # turn off interrupts
bisl3 $PG_V|PG_KW,8(ap),_CMAP2
mtpr $_CADDR2,$TBIS # invalidate entry for copy
movc3 $NBPG,*4(ap),_CADDR2
bisl3 $PG_V|PG_KW,8(ap),_CMAP2
mtpr $_CADDR2,$TBIS # invalidate entry for copy
movc3 $NBPG,*4(ap),_CADDR2
- mtpr r0,$IPL # restore pri level
*/
_clearseg: .globl _clearseg
.word 0x0
*/
_clearseg: .globl _clearseg
.word 0x0
- mfpr $IPL,r0 # get current pri level
- mtpr $HIGH,$IPL # extreme pri level
bisl3 $PG_V|PG_KW,4(ap),_CMAP1
mtpr $_CADDR1,$TBIS
movc5 $0,(sp),$0,$NBPG,_CADDR1
bisl3 $PG_V|PG_KW,4(ap),_CMAP1
mtpr $_CADDR1,$TBIS
movc5 $0,(sp),$0,$NBPG,_CADDR1
- mtpr r0,$IPL # restore pri level
-/* vm_meter.c 4.4 81/03/09 */
+/* vm_meter.c 4.5 81/04/17 */
#include "../h/param.h"
#include "../h/systm.h"
#include "../h/param.h"
#include "../h/systm.h"
* amount of free memory.
*/
loop:
* amount of free memory.
*/
loop:
deservin = 0;
sleeper = 0;
p = 0;
deservin = 0;
sleeper = 0;
p = 0;
swappable(rp)) {
/*
* Kick out deadwood.
swappable(rp)) {
/*
* Kick out deadwood.
- * FOLLOWING 3 LINES MUST BE AT spl6().
rp->p_flag &= ~SLOAD;
if (rp->p_stat == SRUN)
remrq(rp);
rp->p_flag &= ~SLOAD;
if (rp->p_stat == SRUN)
remrq(rp);
(void) swapout(rp, rp->p_dsize, rp->p_ssize);
goto loop;
}
(void) swapout(rp, rp->p_dsize, rp->p_ssize);
goto loop;
}
* No one wants in, so nothing to do.
*/
if (outpri == -20000) {
* No one wants in, so nothing to do.
*/
if (outpri == -20000) {
- runout++;
- sleep((caddr_t)&runout, PSWP);
+ (void) spl6();
+ if (wantin) {
+ wantin = 0;
+ sleep((caddr_t)&lbolt, PSWP);
+ } else {
+ runout++;
+ sleep((caddr_t)&runout, PSWP);
+ }
+ (void) spl0();
/*
* Decide how deserving this guy is. If he is deserving
* we will be willing to work harder to bring him in.
/*
* Decide how deserving this guy is. If he is deserving
* we will be willing to work harder to bring him in.
* Select the nbig largest jobs, then the oldest of these
* is ``most likely to get booted.''
*/
* Select the nbig largest jobs, then the oldest of these
* is ``most likely to get booted.''
*/
inp = p;
sleeper = 0;
if (nbig > MAXNBIG)
inp = p;
sleeper = 0;
if (nbig > MAXNBIG)
* we kick the poor luser out.
*/
if (sleeper || desperate && p || deservin && inpri > maxslp) {
* we kick the poor luser out.
*/
if (sleeper || desperate && p || deservin && inpri > maxslp) {
p->p_flag &= ~SLOAD;
if (p->p_stat == SRUN)
remrq(p);
p->p_flag &= ~SLOAD;
if (p->p_stat == SRUN)
remrq(p);
if (desperate) {
/*
* Want to give this space to the rest of
if (desperate) {
/*
* Want to give this space to the rest of
(void) spl6();
runin++;
sleep((caddr_t)&runin, PSWP);
(void) spl6();
runin++;
sleep((caddr_t)&runin, PSWP);