Tracking 4.4 integration
This commit is contained in:
parent
8f6071b2ce
commit
bdfe8b6177
|
@ -33,7 +33,7 @@
|
|||
*
|
||||
* from: @(#)genassym.c 7.8 (Berkeley) 5/7/91
|
||||
* from: genassym.c,v 1.2 1993/05/22 07:57:23 cgd Exp
|
||||
* $Id: genassym.c,v 1.16 1994/05/05 03:09:11 gwr Exp $
|
||||
* $Id: genassym.c,v 1.17 1994/05/06 22:09:49 gwr Exp $
|
||||
*/
|
||||
|
||||
#define KERNEL
|
||||
|
@ -145,12 +145,12 @@ main()
|
|||
*/
|
||||
|
||||
/* pcb offsets */
|
||||
printf("#define\tP_LINK %d\n", &p->p_link);
|
||||
printf("#define\tP_RLINK %d\n", &p->p_rlink);
|
||||
printf("#define\tP_FORW %d\n", &p->p_forw);
|
||||
printf("#define\tP_BACK %d\n", &p->p_back);
|
||||
printf("#define\tP_VMSPACE %d\n", &p->p_vmspace);
|
||||
printf("#define\tVM_PMAP %d\n", &vms->vm_pmap);
|
||||
printf("#define\tP_ADDR %d\n", &p->p_addr);
|
||||
printf("#define\tP_PRI %d\n", &p->p_pri);
|
||||
printf("#define\tP_PRIORITY %d\n", &p->p_priority);
|
||||
printf("#define\tP_STAT %d\n", &p->p_stat);
|
||||
printf("#define\tP_WCHAN %d\n", &p->p_wchan);
|
||||
printf("#define\tP_FLAG %d\n", &p->p_flag);
|
||||
|
|
|
@ -40,6 +40,7 @@
|
|||
*
|
||||
* from: @(#)locore.s 7.11 (Berkeley) 5/9/91
|
||||
* locore.s,v 1.2 1993/05/22 07:57:30 cgd Exp
|
||||
* $Id: process.s,v 1.12 1994/05/06 22:09:50 gwr Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
|
@ -47,7 +48,7 @@
|
|||
* _whichqs tells which of the 32 queues _qs
|
||||
* have processes in them. Setrq puts processes into queues, Remrq
|
||||
* removes them from queues. The running process is on no queue,
|
||||
* other processes are on a queue related to p->p_pri, divided by 4
|
||||
* other processes are on a queue related to p->p_priority, divided by 4
|
||||
* actually to shrink the 0-127 range of priorities into the 32 available
|
||||
* queues.
|
||||
*/
|
||||
|
@ -64,25 +65,25 @@
|
|||
*/
|
||||
ENTRY(setrq)
|
||||
movl sp@(4),a0
|
||||
tstl a0@(P_RLINK)
|
||||
tstl a0@(P_BACK)
|
||||
jeq Lset1
|
||||
movl #Lset2,sp@-
|
||||
jbsr _panic
|
||||
Lset1:
|
||||
clrl d0
|
||||
movb a0@(P_PRI),d0
|
||||
movb a0@(P_PRIORITY),d0
|
||||
lsrb #2,d0
|
||||
movl _whichqs,d1
|
||||
bset d0,d1
|
||||
movl d1,_whichqs
|
||||
lslb #3,d0
|
||||
addl #_qs,d0
|
||||
movl d0,a0@(P_LINK)
|
||||
movl d0,a0@(P_FORW)
|
||||
movl d0,a1
|
||||
movl a1@(P_RLINK),a0@(P_RLINK)
|
||||
movl a0,a1@(P_RLINK)
|
||||
movl a0@(P_RLINK),a1
|
||||
movl a0,a1@(P_LINK)
|
||||
movl a1@(P_BACK),a0@(P_BACK)
|
||||
movl a0,a1@(P_BACK)
|
||||
movl a0@(P_BACK),a1
|
||||
movl a0,a1@(P_FORW)
|
||||
rts
|
||||
|
||||
Lset2:
|
||||
|
@ -97,7 +98,7 @@ Lset2:
|
|||
ENTRY(remrq)
|
||||
movl sp@(4),a0
|
||||
clrl d0
|
||||
movb a0@(P_PRI),d0
|
||||
movb a0@(P_PRIORITY),d0
|
||||
lsrb #2,d0
|
||||
movl _whichqs,d1
|
||||
bclr d0,d1
|
||||
|
@ -106,21 +107,21 @@ ENTRY(remrq)
|
|||
jbsr _panic
|
||||
Lrem1:
|
||||
movl d1,_whichqs
|
||||
movl a0@(P_LINK),a1
|
||||
movl a0@(P_RLINK),a1@(P_RLINK)
|
||||
movl a0@(P_RLINK),a1
|
||||
movl a0@(P_LINK),a1@(P_LINK)
|
||||
movl a0@(P_FORW),a1
|
||||
movl a0@(P_BACK),a1@(P_BACK)
|
||||
movl a0@(P_BACK),a1
|
||||
movl a0@(P_FORW),a1@(P_FORW)
|
||||
movl #_qs,a1
|
||||
movl d0,d1
|
||||
lslb #3,d1
|
||||
addl d1,a1
|
||||
cmpl a1@(P_LINK),a1
|
||||
cmpl a1@(P_FORW),a1
|
||||
jeq Lrem2
|
||||
movl _whichqs,d1
|
||||
bset d0,d1
|
||||
movl d1,_whichqs
|
||||
Lrem2:
|
||||
clrl a0@(P_RLINK)
|
||||
clrl a0@(P_BACK)
|
||||
rts
|
||||
|
||||
Lrem3:
|
||||
|
@ -226,13 +227,13 @@ Lswok:
|
|||
lslb #3,d1 | convert queue number to index
|
||||
addl #_qs,d1 | locate queue (q)
|
||||
movl d1,a1
|
||||
cmpl a1@(P_LINK),a1 | anyone on queue?
|
||||
cmpl a1@(P_FORW),a1 | anyone on queue?
|
||||
jeq Lbadsw | no, panic
|
||||
movl a1@(P_LINK),a0 | p = q->p_link
|
||||
movl a0@(P_LINK),a1@(P_LINK) | q->p_link = p->p_link
|
||||
movl a0@(P_LINK),a1 | q = p->p_link
|
||||
movl a0@(P_RLINK),a1@(P_RLINK) | q->p_rlink = p->p_rlink
|
||||
cmpl a0@(P_LINK),d1 | anyone left on queue?
|
||||
movl a1@(P_FORW),a0 | p = q->p_forw
|
||||
movl a0@(P_FORW),a1@(P_FORW) | q->p_forw = p->p_forw
|
||||
movl a0@(P_FORW),a1 | q = p->p_forw
|
||||
movl a0@(P_BACK),a1@(P_BACK) | q->p_back = p->p_back
|
||||
cmpl a0@(P_FORW),d1 | anyone left on queue?
|
||||
jeq Lsw2 | no, skip
|
||||
movl _whichqs,d1
|
||||
bset d0,d1 | yes, reset bit
|
||||
|
@ -268,7 +269,7 @@ Lswnofpsave:
|
|||
cmpb #SRUN,a0@(P_STAT)
|
||||
jne Lbadsw
|
||||
#endif
|
||||
clrl a0@(P_RLINK) | clear back link
|
||||
clrl a0@(P_BACK) | clear back link
|
||||
movl a0@(P_ADDR),a1 | get p_addr
|
||||
movl a1,_curpcb
|
||||
movb a1@(PCB_FLAGS+1),pcbflag | copy of pcb_flags low byte
|
||||
|
|
Loading…
Reference in New Issue