1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-16 10:20:30 +00:00

db_disasm.c: Unused var zapped.

pmap.c: tons of unused vars zapped, various other warnings silenced.
trap.c: unused vars zapped.
vm_machdep.c:  A wrong argument, which by chance did the right thing, was
corrected.
This commit is contained in:
Poul-Henning Kamp 1994-10-08 22:19:51 +00:00
parent d8bd99269c
commit 3fb3086e98
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=3436
9 changed files with 84 additions and 117 deletions

View File

@ -23,7 +23,7 @@
* any improvements or extensions that they make and grant Carnegie the
* rights to redistribute these changes.
*
* $Id: db_disasm.c,v 1.5 1993/12/19 00:49:58 wollman Exp $
* $Id: db_disasm.c,v 1.6 1994/08/13 03:49:35 wollman Exp $
*/
/*
@ -861,7 +861,7 @@ db_read_address(loc, short_addr, regmodrm, addrp)
int regmodrm;
struct i_addr *addrp; /* out */
{
int mod, rm, sib, index, ss, disp;
int mod, rm, sib, index, disp;
mod = f_mod(regmodrm);
rm = f_rm(regmodrm);

View File

@ -39,7 +39,7 @@
* SUCH DAMAGE.
*
* from: @(#)pmap.c 7.7 (Berkeley) 5/12/91
* $Id: pmap.c,v 1.35 1994/09/04 04:11:57 davidg Exp $
* $Id: pmap.c,v 1.36 1994/09/16 13:33:26 davidg Exp $
*/
/*
@ -86,6 +86,7 @@
*/
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/proc.h>
#include <sys/malloc.h>
#include <sys/user.h>
@ -213,9 +214,7 @@ pmap_extract(pmap, va)
register pmap_t pmap;
vm_offset_t va;
{
pd_entry_t save;
vm_offset_t pa;
int s;
if (pmap && *pmap_pde(pmap, va)) {
vm_offset_t frame = (int) pmap->pm_pdir[PTDPTDI] & PG_FRAME;
@ -260,7 +259,7 @@ pmap_is_managed(pa)
/*
* find the vm_page_t of a pte (only) given va of pte and pmap
*/
inline vm_page_t
__inline vm_page_t
pmap_pte_vm_page(pmap, pt)
pmap_t pmap;
vm_offset_t pt;
@ -406,11 +405,9 @@ void
pmap_init(phys_start, phys_end)
vm_offset_t phys_start, phys_end;
{
vm_offset_t addr, addr2;
vm_offset_t addr;
vm_size_t npg, s;
int rv;
int i;
extern int KPTphys;
/*
* Now that kernel map has been allocated, we can mark as
@ -677,7 +674,8 @@ pmap_alloc_pv_entry()
/*
* allocate a physical page out of the vm system
*/
if (m = vm_page_alloc(kernel_object, pvva-vm_map_min(kernel_map))) {
m = vm_page_alloc(kernel_object, pvva-vm_map_min(kernel_map));
if (m) {
int newentries;
int i;
pv_entry_t entry;
@ -769,7 +767,6 @@ pmap_remove_entry(pmap, pv, va)
vm_offset_t va;
{
pv_entry_t npv;
int wired;
int s;
s = splhigh();
if (pmap == pv->pv_pmap && va == pv->pv_va) {
@ -880,7 +877,6 @@ pmap_remove(pmap, sva, eva)
if ( *pmap_pde(pmap, i386_ptob(sva)) == 0 ) {
/* We can race ahead here, straight to next pde.. */
nextpde:
sva = ((sva + NPTEPG) & ~(NPTEPG - 1));
continue;
}
@ -978,7 +974,6 @@ pmap_remove_all(pa)
register pt_entry_t *pte, *ptp;
vm_offset_t va;
struct pmap *pmap;
struct map *map;
vm_page_t m;
int s;
int anyvalid = 0;
@ -1049,7 +1044,6 @@ pmap_protect(pmap, sva, eva, prot)
int i386prot;
register pt_entry_t *ptp;
int evap = i386_btop(eva);
int s;
int anyvalid = 0;;
if (pmap == NULL)
@ -1178,12 +1172,11 @@ pmap_enter(pmap, va, pa, prot, wired)
* resident as long as there are valid mappings in them.
* Hence, if a user page is wired, the PT page will be also.
*/
if (wired && !pmap_pte_w(pte) || !wired && pmap_pte_w(pte)) {
if (wired)
pmap->pm_stats.wired_count++;
else
pmap->pm_stats.wired_count--;
}
if (wired && !pmap_pte_w(pte))
pmap->pm_stats.wired_count++;
else if (!wired && pmap_pte_w(pte))
pmap->pm_stats.wired_count--;
goto validate;
}
@ -1430,8 +1423,6 @@ pmap_enter_quick(pmap, va, pa)
*/
pmap->pm_stats.resident_count++;
validate:
if (*pte)
anyvalid++;
/*
@ -1458,9 +1449,7 @@ pmap_object_init_pt(pmap, addr, object, offset, size)
vm_offset_t tmpoff;
vm_page_t p;
int s;
vm_offset_t v, lastv=0;
pt_entry_t pte;
vm_offset_t v;
vm_offset_t objbytes;
int anyvalid = 0;
@ -1502,7 +1491,8 @@ pmap_object_init_pt(pmap, addr, object, offset, size)
* else lookup the pages one-by-one.
*/
for(tmpoff = 0; tmpoff < size; tmpoff += NBPG) {
if( p = vm_page_lookup(object, tmpoff + offset)) {
p = vm_page_lookup(object, tmpoff + offset);
if (p) {
if( (p->flags & (PG_BUSY|PG_FICTITIOUS)) == 0) {
vm_page_hold(p);
v = i386_trunc_page(((vm_offset_t)vtopte( addr+tmpoff)));
@ -1538,12 +1528,12 @@ pmap_change_wiring(pmap, va, wired)
return;
pte = pmap_pte(pmap, va);
if (wired && !pmap_pte_w(pte) || !wired && pmap_pte_w(pte)) {
if (wired)
pmap->pm_stats.wired_count++;
else
pmap->pm_stats.wired_count--;
}
if (wired && !pmap_pte_w(pte))
pmap->pm_stats.wired_count++;
else if (!wired && pmap_pte_w(pte))
pmap->pm_stats.wired_count--;
/*
* Wiring is not a hardware characteristic so there is no need
* to invalidate TLB.

View File

@ -35,7 +35,7 @@
* SUCH DAMAGE.
*
* from: @(#)trap.c 7.4 (Berkeley) 5/13/91
* $Id: trap.c,v 1.34 1994/09/11 11:26:18 davidg Exp $
* $Id: trap.c,v 1.35 1994/10/01 02:56:05 davidg Exp $
*/
/*
@ -63,6 +63,7 @@
#include <machine/psl.h>
#include <machine/reg.h>
#include <machine/trap.h>
#include <machine/../isa/isa_device.h>
#include "isa.h"
#include "npx.h"
@ -110,7 +111,7 @@ userret(p, frame, oticks)
{
int sig, s;
while (sig = CURSIG(p))
while ((sig = CURSIG(p)) != 0)
postsig(sig);
p->p_priority = p->p_usrpri;
if (want_resched) {
@ -127,7 +128,7 @@ userret(p, frame, oticks)
p->p_stats->p_ru.ru_nivcsw++;
mi_switch();
splx(s);
while (sig = CURSIG(p))
while ((sig = CURSIG(p)) != 0)
postsig(sig);
}
if (p->p_stats->p_prof.pr_scale) {
@ -161,7 +162,7 @@ trap(frame)
{
struct proc *p = curproc;
u_quad_t sticks = 0;
int i = 0, ucode = 0, type, code, eva, fault_type;
int i = 0, ucode = 0, type, code;
frame.tf_eflags &= ~PSL_NT; /* clear nested trap XXX */
type = frame.tf_trapno;
@ -339,7 +340,7 @@ trap_pfault(frame, usermode)
vm_offset_t va;
struct vmspace *vm = NULL;
vm_map_t map = 0;
int rv = 0, oldflags;
int rv = 0;
vm_prot_t ftype;
extern vm_map_t kernel_map;
int eva;
@ -377,7 +378,6 @@ trap_pfault(frame, usermode)
ftype = VM_PROT_READ;
if (map != kernel_map) {
vm_offset_t pa;
vm_offset_t v = (vm_offset_t) vtopte(va);
vm_page_t ptepg;
@ -496,8 +496,8 @@ trap_fatal(frame)
printf("IOPL = %d\n", (frame->tf_eflags & PSL_IOPL) >> 12);
printf("current process = ");
if (curproc) {
printf("%d (%s)\n",
curproc->p_pid, curproc->p_comm ?
printf("%lu (%s)\n",
(u_long)curproc->p_pid, curproc->p_comm ?
curproc->p_comm : "");
} else {
printf("Idle\n");
@ -539,7 +539,6 @@ int trapwrite(addr)
struct proc *p;
vm_offset_t va, v;
struct vmspace *vm;
int oldflags;
int rv;
va = trunc_page((vm_offset_t)addr);

View File

@ -38,7 +38,7 @@
*
* from: @(#)vm_machdep.c 7.3 (Berkeley) 5/13/91
* Utah $Hdr: vm_machdep.c 1.16.1.1 89/06/23$
* $Id: vm_machdep.c,v 1.27 1994/08/31 06:17:33 davidg Exp $
* $Id: vm_machdep.c,v 1.28 1994/09/02 04:12:07 davidg Exp $
*/
#include "npx.h"
@ -100,7 +100,8 @@ vm_bounce_page_find(count)
retry:
for (i = 0; i < bounceallocarraysize; i++) {
if (bounceallocarray[i] != 0xffffffff) {
if (bit = ffs(~bounceallocarray[i])) {
bit = ffs(~bounceallocarray[i]);
if (bit) {
bounceallocarray[i] |= 1 << (bit - 1) ;
bouncefree -= count;
splx(s);
@ -184,7 +185,6 @@ vm_bounce_kva(size, waitok)
int waitok;
{
int i;
int startfree;
vm_offset_t kva = 0;
vm_offset_t off;
int s = splbio();
@ -281,9 +281,7 @@ vm_bounce_alloc(bp)
vm_offset_t va, kva;
vm_offset_t pa;
int dobounceflag = 0;
int bounceindex;
int i;
int s;
if (bouncepages == 0)
return;
@ -294,7 +292,8 @@ vm_bounce_alloc(bp)
}
if (bp->b_bufsize < bp->b_bcount) {
printf("vm_bounce_alloc: b_bufsize(0x%x) < b_bcount(0x%x) !!!!\n",
printf(
"vm_bounce_alloc: b_bufsize(0x%lx) < b_bcount(0x%lx) !!\n",
bp->b_bufsize, bp->b_bcount);
panic("vm_bounce_alloc");
}
@ -394,8 +393,6 @@ vm_bounce_free(bp)
{
int i;
vm_offset_t origkva, bouncekva, bouncekvaend;
int countvmpg;
int s;
/*
* if this isn't a bounced buffer, then just return
@ -482,7 +479,6 @@ vm_bounce_free(bp)
void
vm_bounce_init()
{
vm_offset_t minaddr, maxaddr;
int i;
kvasfreecnt = 0;
@ -547,7 +543,7 @@ cpu_fork(p1, p2)
register struct proc *p1, *p2;
{
register struct user *up = p2->p_addr;
int foo, offset, addr, i;
int offset;
extern char kstack[];
extern int mvesp();
@ -575,7 +571,7 @@ cpu_fork(p1, p2)
* Arrange for a non-local goto when the new process
* is started, to resume here, returning nonzero from setjmp.
*/
if (savectx(up, 1)) {
if (savectx(&up->u_pcb, 1)) {
/*
* Return 1 in child.
*/
@ -605,7 +601,6 @@ cpu_exit(p)
void
cpu_wait(p) struct proc *p; {
/* extern vm_map_t upages_map; */
extern char kstack[];
/* drop per-process resources */
pmap_remove(vm_map_pmap(kernel_map), (vm_offset_t) p->p_addr,
@ -768,7 +763,7 @@ vunmapbuf(bp)
register struct buf *bp;
{
register caddr_t addr;
vm_offset_t kva,va,v,lastv,pa;
vm_offset_t v,lastv,pa;
if ((bp->b_flags & B_PHYS) == 0)
panic("vunmapbuf");

View File

@ -23,7 +23,7 @@
* any improvements or extensions that they make and grant Carnegie the
* rights to redistribute these changes.
*
* $Id: db_disasm.c,v 1.5 1993/12/19 00:49:58 wollman Exp $
* $Id: db_disasm.c,v 1.6 1994/08/13 03:49:35 wollman Exp $
*/
/*
@ -861,7 +861,7 @@ db_read_address(loc, short_addr, regmodrm, addrp)
int regmodrm;
struct i_addr *addrp; /* out */
{
int mod, rm, sib, index, ss, disp;
int mod, rm, sib, index, disp;
mod = f_mod(regmodrm);
rm = f_rm(regmodrm);

View File

@ -39,7 +39,7 @@
* SUCH DAMAGE.
*
* from: @(#)pmap.c 7.7 (Berkeley) 5/12/91
* $Id: pmap.c,v 1.35 1994/09/04 04:11:57 davidg Exp $
* $Id: pmap.c,v 1.36 1994/09/16 13:33:26 davidg Exp $
*/
/*
@ -86,6 +86,7 @@
*/
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/proc.h>
#include <sys/malloc.h>
#include <sys/user.h>
@ -213,9 +214,7 @@ pmap_extract(pmap, va)
register pmap_t pmap;
vm_offset_t va;
{
pd_entry_t save;
vm_offset_t pa;
int s;
if (pmap && *pmap_pde(pmap, va)) {
vm_offset_t frame = (int) pmap->pm_pdir[PTDPTDI] & PG_FRAME;
@ -260,7 +259,7 @@ pmap_is_managed(pa)
/*
* find the vm_page_t of a pte (only) given va of pte and pmap
*/
inline vm_page_t
__inline vm_page_t
pmap_pte_vm_page(pmap, pt)
pmap_t pmap;
vm_offset_t pt;
@ -406,11 +405,9 @@ void
pmap_init(phys_start, phys_end)
vm_offset_t phys_start, phys_end;
{
vm_offset_t addr, addr2;
vm_offset_t addr;
vm_size_t npg, s;
int rv;
int i;
extern int KPTphys;
/*
* Now that kernel map has been allocated, we can mark as
@ -677,7 +674,8 @@ pmap_alloc_pv_entry()
/*
* allocate a physical page out of the vm system
*/
if (m = vm_page_alloc(kernel_object, pvva-vm_map_min(kernel_map))) {
m = vm_page_alloc(kernel_object, pvva-vm_map_min(kernel_map));
if (m) {
int newentries;
int i;
pv_entry_t entry;
@ -769,7 +767,6 @@ pmap_remove_entry(pmap, pv, va)
vm_offset_t va;
{
pv_entry_t npv;
int wired;
int s;
s = splhigh();
if (pmap == pv->pv_pmap && va == pv->pv_va) {
@ -880,7 +877,6 @@ pmap_remove(pmap, sva, eva)
if ( *pmap_pde(pmap, i386_ptob(sva)) == 0 ) {
/* We can race ahead here, straight to next pde.. */
nextpde:
sva = ((sva + NPTEPG) & ~(NPTEPG - 1));
continue;
}
@ -978,7 +974,6 @@ pmap_remove_all(pa)
register pt_entry_t *pte, *ptp;
vm_offset_t va;
struct pmap *pmap;
struct map *map;
vm_page_t m;
int s;
int anyvalid = 0;
@ -1049,7 +1044,6 @@ pmap_protect(pmap, sva, eva, prot)
int i386prot;
register pt_entry_t *ptp;
int evap = i386_btop(eva);
int s;
int anyvalid = 0;;
if (pmap == NULL)
@ -1178,12 +1172,11 @@ pmap_enter(pmap, va, pa, prot, wired)
* resident as long as there are valid mappings in them.
* Hence, if a user page is wired, the PT page will be also.
*/
if (wired && !pmap_pte_w(pte) || !wired && pmap_pte_w(pte)) {
if (wired)
pmap->pm_stats.wired_count++;
else
pmap->pm_stats.wired_count--;
}
if (wired && !pmap_pte_w(pte))
pmap->pm_stats.wired_count++;
else if (!wired && pmap_pte_w(pte))
pmap->pm_stats.wired_count--;
goto validate;
}
@ -1430,8 +1423,6 @@ pmap_enter_quick(pmap, va, pa)
*/
pmap->pm_stats.resident_count++;
validate:
if (*pte)
anyvalid++;
/*
@ -1458,9 +1449,7 @@ pmap_object_init_pt(pmap, addr, object, offset, size)
vm_offset_t tmpoff;
vm_page_t p;
int s;
vm_offset_t v, lastv=0;
pt_entry_t pte;
vm_offset_t v;
vm_offset_t objbytes;
int anyvalid = 0;
@ -1502,7 +1491,8 @@ pmap_object_init_pt(pmap, addr, object, offset, size)
* else lookup the pages one-by-one.
*/
for(tmpoff = 0; tmpoff < size; tmpoff += NBPG) {
if( p = vm_page_lookup(object, tmpoff + offset)) {
p = vm_page_lookup(object, tmpoff + offset);
if (p) {
if( (p->flags & (PG_BUSY|PG_FICTITIOUS)) == 0) {
vm_page_hold(p);
v = i386_trunc_page(((vm_offset_t)vtopte( addr+tmpoff)));
@ -1538,12 +1528,12 @@ pmap_change_wiring(pmap, va, wired)
return;
pte = pmap_pte(pmap, va);
if (wired && !pmap_pte_w(pte) || !wired && pmap_pte_w(pte)) {
if (wired)
pmap->pm_stats.wired_count++;
else
pmap->pm_stats.wired_count--;
}
if (wired && !pmap_pte_w(pte))
pmap->pm_stats.wired_count++;
else if (!wired && pmap_pte_w(pte))
pmap->pm_stats.wired_count--;
/*
* Wiring is not a hardware characteristic so there is no need
* to invalidate TLB.

View File

@ -35,7 +35,7 @@
* SUCH DAMAGE.
*
* from: @(#)trap.c 7.4 (Berkeley) 5/13/91
* $Id: trap.c,v 1.34 1994/09/11 11:26:18 davidg Exp $
* $Id: trap.c,v 1.35 1994/10/01 02:56:05 davidg Exp $
*/
/*
@ -63,6 +63,7 @@
#include <machine/psl.h>
#include <machine/reg.h>
#include <machine/trap.h>
#include <machine/../isa/isa_device.h>
#include "isa.h"
#include "npx.h"
@ -110,7 +111,7 @@ userret(p, frame, oticks)
{
int sig, s;
while (sig = CURSIG(p))
while ((sig = CURSIG(p)) != 0)
postsig(sig);
p->p_priority = p->p_usrpri;
if (want_resched) {
@ -127,7 +128,7 @@ userret(p, frame, oticks)
p->p_stats->p_ru.ru_nivcsw++;
mi_switch();
splx(s);
while (sig = CURSIG(p))
while ((sig = CURSIG(p)) != 0)
postsig(sig);
}
if (p->p_stats->p_prof.pr_scale) {
@ -161,7 +162,7 @@ trap(frame)
{
struct proc *p = curproc;
u_quad_t sticks = 0;
int i = 0, ucode = 0, type, code, eva, fault_type;
int i = 0, ucode = 0, type, code;
frame.tf_eflags &= ~PSL_NT; /* clear nested trap XXX */
type = frame.tf_trapno;
@ -339,7 +340,7 @@ trap_pfault(frame, usermode)
vm_offset_t va;
struct vmspace *vm = NULL;
vm_map_t map = 0;
int rv = 0, oldflags;
int rv = 0;
vm_prot_t ftype;
extern vm_map_t kernel_map;
int eva;
@ -377,7 +378,6 @@ trap_pfault(frame, usermode)
ftype = VM_PROT_READ;
if (map != kernel_map) {
vm_offset_t pa;
vm_offset_t v = (vm_offset_t) vtopte(va);
vm_page_t ptepg;
@ -496,8 +496,8 @@ trap_fatal(frame)
printf("IOPL = %d\n", (frame->tf_eflags & PSL_IOPL) >> 12);
printf("current process = ");
if (curproc) {
printf("%d (%s)\n",
curproc->p_pid, curproc->p_comm ?
printf("%lu (%s)\n",
(u_long)curproc->p_pid, curproc->p_comm ?
curproc->p_comm : "");
} else {
printf("Idle\n");
@ -539,7 +539,6 @@ int trapwrite(addr)
struct proc *p;
vm_offset_t va, v;
struct vmspace *vm;
int oldflags;
int rv;
va = trunc_page((vm_offset_t)addr);

View File

@ -38,7 +38,7 @@
*
* from: @(#)vm_machdep.c 7.3 (Berkeley) 5/13/91
* Utah $Hdr: vm_machdep.c 1.16.1.1 89/06/23$
* $Id: vm_machdep.c,v 1.27 1994/08/31 06:17:33 davidg Exp $
* $Id: vm_machdep.c,v 1.28 1994/09/02 04:12:07 davidg Exp $
*/
#include "npx.h"
@ -100,7 +100,8 @@ vm_bounce_page_find(count)
retry:
for (i = 0; i < bounceallocarraysize; i++) {
if (bounceallocarray[i] != 0xffffffff) {
if (bit = ffs(~bounceallocarray[i])) {
bit = ffs(~bounceallocarray[i]);
if (bit) {
bounceallocarray[i] |= 1 << (bit - 1) ;
bouncefree -= count;
splx(s);
@ -184,7 +185,6 @@ vm_bounce_kva(size, waitok)
int waitok;
{
int i;
int startfree;
vm_offset_t kva = 0;
vm_offset_t off;
int s = splbio();
@ -281,9 +281,7 @@ vm_bounce_alloc(bp)
vm_offset_t va, kva;
vm_offset_t pa;
int dobounceflag = 0;
int bounceindex;
int i;
int s;
if (bouncepages == 0)
return;
@ -294,7 +292,8 @@ vm_bounce_alloc(bp)
}
if (bp->b_bufsize < bp->b_bcount) {
printf("vm_bounce_alloc: b_bufsize(0x%x) < b_bcount(0x%x) !!!!\n",
printf(
"vm_bounce_alloc: b_bufsize(0x%lx) < b_bcount(0x%lx) !!\n",
bp->b_bufsize, bp->b_bcount);
panic("vm_bounce_alloc");
}
@ -394,8 +393,6 @@ vm_bounce_free(bp)
{
int i;
vm_offset_t origkva, bouncekva, bouncekvaend;
int countvmpg;
int s;
/*
* if this isn't a bounced buffer, then just return
@ -482,7 +479,6 @@ vm_bounce_free(bp)
void
vm_bounce_init()
{
vm_offset_t minaddr, maxaddr;
int i;
kvasfreecnt = 0;
@ -547,7 +543,7 @@ cpu_fork(p1, p2)
register struct proc *p1, *p2;
{
register struct user *up = p2->p_addr;
int foo, offset, addr, i;
int offset;
extern char kstack[];
extern int mvesp();
@ -575,7 +571,7 @@ cpu_fork(p1, p2)
* Arrange for a non-local goto when the new process
* is started, to resume here, returning nonzero from setjmp.
*/
if (savectx(up, 1)) {
if (savectx(&up->u_pcb, 1)) {
/*
* Return 1 in child.
*/
@ -605,7 +601,6 @@ cpu_exit(p)
void
cpu_wait(p) struct proc *p; {
/* extern vm_map_t upages_map; */
extern char kstack[];
/* drop per-process resources */
pmap_remove(vm_map_pmap(kernel_map), (vm_offset_t) p->p_addr,
@ -768,7 +763,7 @@ vunmapbuf(bp)
register struct buf *bp;
{
register caddr_t addr;
vm_offset_t kva,va,v,lastv,pa;
vm_offset_t v,lastv,pa;
if ((bp->b_flags & B_PHYS) == 0)
panic("vunmapbuf");

View File

@ -35,7 +35,7 @@
* SUCH DAMAGE.
*
* from: @(#)trap.c 7.4 (Berkeley) 5/13/91
* $Id: trap.c,v 1.34 1994/09/11 11:26:18 davidg Exp $
* $Id: trap.c,v 1.35 1994/10/01 02:56:05 davidg Exp $
*/
/*
@ -63,6 +63,7 @@
#include <machine/psl.h>
#include <machine/reg.h>
#include <machine/trap.h>
#include <machine/../isa/isa_device.h>
#include "isa.h"
#include "npx.h"
@ -110,7 +111,7 @@ userret(p, frame, oticks)
{
int sig, s;
while (sig = CURSIG(p))
while ((sig = CURSIG(p)) != 0)
postsig(sig);
p->p_priority = p->p_usrpri;
if (want_resched) {
@ -127,7 +128,7 @@ userret(p, frame, oticks)
p->p_stats->p_ru.ru_nivcsw++;
mi_switch();
splx(s);
while (sig = CURSIG(p))
while ((sig = CURSIG(p)) != 0)
postsig(sig);
}
if (p->p_stats->p_prof.pr_scale) {
@ -161,7 +162,7 @@ trap(frame)
{
struct proc *p = curproc;
u_quad_t sticks = 0;
int i = 0, ucode = 0, type, code, eva, fault_type;
int i = 0, ucode = 0, type, code;
frame.tf_eflags &= ~PSL_NT; /* clear nested trap XXX */
type = frame.tf_trapno;
@ -339,7 +340,7 @@ trap_pfault(frame, usermode)
vm_offset_t va;
struct vmspace *vm = NULL;
vm_map_t map = 0;
int rv = 0, oldflags;
int rv = 0;
vm_prot_t ftype;
extern vm_map_t kernel_map;
int eva;
@ -377,7 +378,6 @@ trap_pfault(frame, usermode)
ftype = VM_PROT_READ;
if (map != kernel_map) {
vm_offset_t pa;
vm_offset_t v = (vm_offset_t) vtopte(va);
vm_page_t ptepg;
@ -496,8 +496,8 @@ trap_fatal(frame)
printf("IOPL = %d\n", (frame->tf_eflags & PSL_IOPL) >> 12);
printf("current process = ");
if (curproc) {
printf("%d (%s)\n",
curproc->p_pid, curproc->p_comm ?
printf("%lu (%s)\n",
(u_long)curproc->p_pid, curproc->p_comm ?
curproc->p_comm : "");
} else {
printf("Idle\n");
@ -539,7 +539,6 @@ int trapwrite(addr)
struct proc *p;
vm_offset_t va, v;
struct vmspace *vm;
int oldflags;
int rv;
va = trunc_page((vm_offset_t)addr);