TRUE -> true, FALSE -> false

This commit is contained in:
thorpej 2007-03-07 21:43:43 +00:00
parent 3617998677
commit f00c540051
10 changed files with 534 additions and 537 deletions

File diff suppressed because it is too large Load Diff

View File

@ -1,4 +1,4 @@
/* $NetBSD: db_interface.c,v 1.50 2007/02/22 06:04:06 matt Exp $ */
/* $NetBSD: db_interface.c,v 1.51 2007/03/07 21:43:43 thorpej Exp $ */
/*
* Mach Operating System
@ -33,7 +33,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: db_interface.c,v 1.50 2007/02/22 06:04:06 matt Exp $");
__KERNEL_RCSID(0, "$NetBSD: db_interface.c,v 1.51 2007/03/07 21:43:43 thorpej Exp $");
#include "opt_ddb.h"
#include "opt_multiprocessor.h"
@ -222,9 +222,9 @@ kdb_trap(type, code, regs)
ddb_regs.tf_ss &= 0xffff;
s = splhigh();
db_active++;
cnpollc(TRUE);
cnpollc(true);
db_trap(type, code);
cnpollc(FALSE);
cnpollc(false);
db_active--;
splx(s);
#ifdef MULTIPROCESSOR

View File

@ -1,4 +1,4 @@
/* $NetBSD: db_trace.c,v 1.55 2007/02/21 23:48:11 thorpej Exp $ */
/* $NetBSD: db_trace.c,v 1.56 2007/03/07 21:43:43 thorpej Exp $ */
/*
* Mach Operating System
@ -27,7 +27,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: db_trace.c,v 1.55 2007/02/21 23:48:11 thorpej Exp $");
__KERNEL_RCSID(0, "$NetBSD: db_trace.c,v 1.56 2007/03/07 21:43:43 thorpej Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -115,7 +115,7 @@ struct i386_frame {
db_addr_t db_trap_symbol_value = 0;
db_addr_t db_syscall_symbol_value = 0;
db_addr_t db_kdintr_symbol_value = 0;
bool db_trace_symbols_found = FALSE;
bool db_trace_symbols_found = false;
#if 0
static void
@ -129,7 +129,7 @@ db_find_trace_symbols(void)
db_kdintr_symbol_value = (db_addr_t) value;
if (db_value_of_name("_syscall", &value))
db_syscall_symbol_value = (db_addr_t) value;
db_trace_symbols_found = TRUE;
db_trace_symbols_found = true;
}
#endif
@ -144,11 +144,11 @@ db_numargs(int *retaddrp)
int args;
extern char etext[];
argp = (int *)db_get_value((int)retaddrp, 4, FALSE);
argp = (int *)db_get_value((int)retaddrp, 4, false);
if (argp < (int *)VM_MIN_KERNEL_ADDRESS || argp > (int *)etext) {
args = 5;
} else {
inst = db_get_value((int)argp, 4, FALSE);
inst = db_get_value((int)argp, 4, false);
if ((inst & 0xff) == 0x59) /* popl %ecx */
args = 1;
else if ((inst & 0xffff) == 0xc483) /* addl %n, %esp */
@ -274,9 +274,9 @@ db_nextframe(
switch (is_trap) {
case NONE:
*ip = (db_addr_t)
db_get_value((int)*retaddr, 4, FALSE);
db_get_value((int)*retaddr, 4, false);
fp = (struct i386_frame *)
db_get_value((int)*nextframe, 4, FALSE);
db_get_value((int)*nextframe, 4, false);
if (fp == NULL)
return 0;
*nextframe = (int *)&fp->f_frame;
@ -340,8 +340,8 @@ db_nextframe(
&& traptype == INTERRUPT) {
for (i = 0; i < 4; i++) {
ifp = (struct intrframe *)(argp + i);
err = db_get_value((int)&ifp->__if_err, 4, FALSE);
trapno = db_get_value((int)&ifp->__if_trapno, 4, FALSE);
err = db_get_value((int)&ifp->__if_err, 4, false);
trapno = db_get_value((int)&ifp->__if_trapno, 4, false);
if ((err == 0 || err == IREENT_MAGIC) && trapno == T_ASTFLT) {
*nextframe = (int *)ifp - 1;
break;
@ -371,10 +371,10 @@ db_intrstack_p(const void *vp)
}
if ((cp - INTRSTACKSIZE + 4) <= (const char *)vp &&
(const char *)vp <= cp) {
return TRUE;
return true;
}
}
return FALSE;
return false;
}
void
@ -386,9 +386,9 @@ db_stack_trace_print(db_expr_t addr, bool have_addr, db_expr_t count,
int *argp;
db_addr_t callpc;
int is_trap;
bool kernel_only = TRUE;
bool trace_thread = FALSE;
bool lwpaddr = FALSE;
bool kernel_only = true;
bool trace_thread = false;
bool lwpaddr = false;
#if 0
if (!db_trace_symbols_found)
@ -401,13 +401,13 @@ db_stack_trace_print(db_expr_t addr, bool have_addr, db_expr_t count,
while ((c = *cp++) != 0) {
if (c == 'a') {
lwpaddr = TRUE;
trace_thread = TRUE;
lwpaddr = true;
trace_thread = true;
}
if (c == 't')
trace_thread = TRUE;
trace_thread = true;
if (c == 'u')
kernel_only = FALSE;
kernel_only = false;
}
}
@ -445,14 +445,14 @@ db_stack_trace_print(db_expr_t addr, bool have_addr, db_expr_t count,
} else {
frame = (int *)u->u_pcb.pcb_ebp;
callpc = (db_addr_t)
db_get_value((int)(frame + 1), 4, FALSE);
db_get_value((int)(frame + 1), 4, false);
(*pr)("at %p\n", frame);
frame = (int *)*frame; /* XXXfvdl db_get_value? */
}
} else {
frame = (int *)addr;
callpc = (db_addr_t)
db_get_value((int)(frame + 1), 4, FALSE);
db_get_value((int)(frame + 1), 4, false);
frame = (int *)*frame; /* XXXfvdl db_get_value? */
}
}
@ -476,7 +476,7 @@ db_stack_trace_print(db_expr_t addr, bool have_addr, db_expr_t count,
if (lastframe == 0 && sym == (db_sym_t)0) {
/* Symbol not found, peek at code */
int instr = db_get_value(callpc, 4, FALSE);
int instr = db_get_value(callpc, 4, false);
offset = 1;
if ((instr & 0x00ffffff) == 0x00e58955 ||
@ -509,7 +509,7 @@ db_stack_trace_print(db_expr_t addr, bool have_addr, db_expr_t count,
while (narg) {
if (argnp)
(*pr)("%s=", *argnp++);
(*pr)("%lx", db_get_value((int)argp, 4, FALSE));
(*pr)("%lx", db_get_value((int)argp, 4, false));
argp++;
if (--narg != 0)
(*pr)(",");
@ -524,7 +524,7 @@ db_stack_trace_print(db_expr_t addr, bool have_addr, db_expr_t count,
lastframe = (int *)fp;
callpc = (db_addr_t)
db_get_value((db_addr_t)&fp->f_retaddr, 4, FALSE);
db_get_value((db_addr_t)&fp->f_retaddr, 4, false);
continue;
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: machdep.c,v 1.600 2007/03/04 05:59:57 christos Exp $ */
/* $NetBSD: machdep.c,v 1.601 2007/03/07 21:43:43 thorpej Exp $ */
/*-
* Copyright (c) 1996, 1997, 1998, 2000, 2004, 2006 The NetBSD Foundation, Inc.
@ -72,7 +72,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.600 2007/03/04 05:59:57 christos Exp $");
__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.601 2007/03/07 21:43:43 thorpej Exp $");
#include "opt_beep.h"
#include "opt_compat_ibcs2.h"
@ -469,19 +469,19 @@ cpu_startup()
* limits the number of processes exec'ing at any time.
*/
exec_map = uvm_km_suballoc(kernel_map, &minaddr, &maxaddr,
16*NCARGS, VM_MAP_PAGEABLE, FALSE, NULL);
16*NCARGS, VM_MAP_PAGEABLE, false, NULL);
/*
* Allocate a submap for physio
*/
phys_map = uvm_km_suballoc(kernel_map, &minaddr, &maxaddr,
VM_PHYS_SIZE, 0, FALSE, NULL);
VM_PHYS_SIZE, 0, false, NULL);
/*
* Finally, allocate mbuf cluster submap.
*/
mb_map = uvm_km_suballoc(kernel_map, &minaddr, &maxaddr,
nmbclusters * mclbytes, VM_MAP_INTRSAFE, FALSE, NULL);
nmbclusters * mclbytes, VM_MAP_INTRSAFE, false, NULL);
format_bytes(pbuf, sizeof(pbuf), ptoa(uvmexp.free));
printf("avail memory = %s\n", pbuf);
@ -2035,7 +2035,7 @@ init386(paddr_t first_avail)
#if defined(MULTIBOOT)
loaded = multiboot_ksyms_init();
#else
loaded = FALSE;
loaded = false;
#endif
if (!loaded) {
symtab = lookup_bootinfo(BTINFO_SYMTAB);

View File

@ -1,4 +1,4 @@
/* $NetBSD: multiboot.c,v 1.11 2007/03/04 05:59:57 christos Exp $ */
/* $NetBSD: multiboot.c,v 1.12 2007/03/07 21:43:45 thorpej Exp $ */
/*-
* Copyright (c) 2005, 2006 The NetBSD Foundation, Inc.
@ -37,7 +37,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: multiboot.c,v 1.11 2007/03/04 05:59:57 christos Exp $");
__KERNEL_RCSID(0, "$NetBSD: multiboot.c,v 1.12 2007/03/07 21:43:45 thorpej Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -96,7 +96,7 @@ extern int * esym;
static char Multiboot_Cmdline[255];
static uint8_t Multiboot_Drives[255];
static struct multiboot_info Multiboot_Info;
static bool Multiboot_Loader = FALSE;
static bool Multiboot_Loader = false;
static char Multiboot_Loader_Name[255];
static uint8_t Multiboot_Mmap[1024];
static struct multiboot_symbols Multiboot_Symbols;
@ -140,7 +140,7 @@ multiboot_pre_reloc(struct multiboot_info *mi)
struct multiboot_info *midest =
RELOC(struct multiboot_info *, &Multiboot_Info);
*RELOC(bool *, &Multiboot_Loader) = TRUE;
*RELOC(bool *, &Multiboot_Loader) = true;
memcpy(midest, mi, sizeof(Multiboot_Info));
if (mi->mi_flags & MULTIBOOT_INFO_HAS_CMDLINE) {
@ -440,7 +440,7 @@ setup_bootdisk(struct multiboot_info *mi)
bool found;
struct btinfo_rootdevice bi;
found = FALSE;
found = false;
if (mi->mi_flags & MULTIBOOT_INFO_HAS_CMDLINE)
found = optstr_get(mi->mi_cmdline, "root", bi.devname,
@ -470,7 +470,7 @@ setup_bootdisk(struct multiboot_info *mi)
bi.devname[3] = 'a';
bi.devname[4] = '\0';
found = TRUE;
found = true;
}
if (found) {
@ -537,7 +537,7 @@ setup_console(struct multiboot_info *mi)
struct btinfo_console bi;
bool found;
found = FALSE;
found = false;
if (mi->mi_flags & MULTIBOOT_INFO_HAS_CMDLINE)
found = optstr_get(mi->mi_cmdline, "console", bi.devname,

View File

@ -1,4 +1,4 @@
/* $NetBSD: pmap.c,v 1.201 2007/03/04 18:00:28 ad Exp $ */
/* $NetBSD: pmap.c,v 1.202 2007/03/07 21:43:45 thorpej Exp $ */
/*
*
@ -60,7 +60,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.201 2007/03/04 18:00:28 ad Exp $");
__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.202 2007/03/07 21:43:45 thorpej Exp $");
#include "opt_cputype.h"
#include "opt_user_ldt.h"
@ -338,7 +338,7 @@ int pmap_pg_g = 0;
#ifdef LARGEPAGES
/*
* pmap_largepages: if our processor supports PG_PS and we are
* using it, this is set to TRUE.
* using it, this is set to true.
*/
int pmap_largepages;
@ -358,7 +358,7 @@ paddr_t avail_end; /* PA of last available physical page */
*/
static pt_entry_t protection_codes[8]; /* maps MI prot to i386 prot code */
static bool pmap_initialized = FALSE; /* pmap_init done yet? */
static bool pmap_initialized = false; /* pmap_init done yet? */
/*
* the following two vaddr_t's are used during system startup
@ -1071,7 +1071,7 @@ pmap_init()
* done: pmap module is up (and ready for business)
*/
pmap_initialized = TRUE;
pmap_initialized = true;
}
/*
@ -1843,10 +1843,10 @@ pmap_reactivate(struct pmap *pmap)
if (oldcpus & cpumask) {
KASSERT(ci->ci_tlbstate == TLBSTATE_LAZY);
/* got it */
result = TRUE;
result = true;
} else {
KASSERT(ci->ci_tlbstate == TLBSTATE_STALE);
result = FALSE;
result = false;
}
ci->ci_tlbstate = TLBSTATE_VALID;
splx(s);
@ -2022,7 +2022,7 @@ pmap_extract(pmap, va, pap)
if (pde & PG_PS) {
if (pap != NULL)
*pap = (pde & PG_LGFRAME) | (va & ~PG_LGFRAME);
return (TRUE);
return (true);
}
#endif
@ -2033,10 +2033,10 @@ pmap_extract(pmap, va, pap)
if (__predict_true((pte & PG_V) != 0)) {
if (pap != NULL)
*pap = (pte & PG_FRAME) | (va & ~PG_FRAME);
return (TRUE);
return (true);
}
}
return (FALSE);
return (false);
}
@ -2051,7 +2051,7 @@ vtophys(va)
{
paddr_t pa;
if (pmap_extract(pmap_kernel(), va, &pa) == TRUE)
if (pmap_extract(pmap_kernel(), va, &pa) == true)
return (pa);
return (0);
}
@ -2123,7 +2123,7 @@ pmap_zero_page(pa)
/*
* pmap_pagezeroidle: the same, for the idle loop page zero'er.
* Returns TRUE if the page was zero'd, FALSE if we aborted for
* Returns true if the page was zero'd, false if we aborted for
* some reason.
*/
@ -2136,7 +2136,7 @@ pmap_pageidlezero(pa)
#endif
pt_entry_t *zpte = PTESLEW(zero_pte, id);
void *zerova = VASLEW(zerop, id);
bool rv = TRUE;
bool rv = true;
int *ptr;
int *ep;
#if defined(I686_CPU)
@ -2160,7 +2160,7 @@ pmap_pageidlezero(pa)
* page.
*/
rv = FALSE;
rv = false;
break;
}
#if defined(I686_CPU)
@ -2346,9 +2346,9 @@ pmap_remove_pte(pmap, ptp, pte, va, cpumaskp, flags)
struct vm_page_md *mdpg;
if (!pmap_valid_entry(*pte))
return(FALSE); /* VA not mapped */
return(false); /* VA not mapped */
if ((flags & PMAP_REMOVE_SKIPWIRED) && (*pte & PG_W)) {
return(FALSE);
return(false);
}
/* atomically save the old PTE and zap! it */
@ -2379,7 +2379,7 @@ pmap_remove_pte(pmap, ptp, pte, va, cpumaskp, flags)
panic("pmap_remove_pte: managed page without "
"PG_PVLIST for 0x%lx", va);
#endif
return(TRUE);
return(true);
}
pg = PHYS_TO_VM_PAGE(opte & PG_FRAME);
@ -2399,7 +2399,7 @@ pmap_remove_pte(pmap, ptp, pte, va, cpumaskp, flags)
if (pve)
pmap_free_pv(pmap, pve);
return(TRUE);
return(true);
}
/*
@ -2803,12 +2803,12 @@ pmap_test_attrs(pg, testbits)
myattrs = &mdpg->mp_attrs;
if (*myattrs & testbits)
return(TRUE);
return(true);
/* test to see if there is a list before bothering to lock */
pvh = &mdpg->mp_pvhead;
if (SPLAY_ROOT(&pvh->pvh_root) == NULL) {
return(FALSE);
return(false);
}
/* nope, gonna have to do it the hard way */
@ -2839,7 +2839,7 @@ pmap_test_attrs(pg, testbits)
* pmap_clear_attrs: clear the specified attribute for a page.
*
* => we set pv_head => pmap locking
* => we return TRUE if we cleared one of the bits we were asked to
* => we return true if we cleared one of the bits we were asked to
*/
bool
@ -3363,7 +3363,7 @@ pmap_growkernel(maxkvaddr)
for (/*null*/ ; nkpde < needed_kpde ; nkpde++) {
if (uvm.page_init_done == FALSE) {
if (uvm.page_init_done == false) {
/*
* we're growing the kernel pmap early (from
@ -3371,7 +3371,7 @@ pmap_growkernel(maxkvaddr)
* handled a little differently.
*/
if (uvm_page_physget(&ptaddr) == FALSE)
if (uvm_page_physget(&ptaddr) == false)
panic("pmap_growkernel: out of memory");
pmap_zero_page(ptaddr);
@ -3385,7 +3385,7 @@ pmap_growkernel(maxkvaddr)
/*
* THIS *MUST* BE CODED SO AS TO WORK IN THE
* pmap_initialized == FALSE CASE! WE MAY BE
* pmap_initialized == false CASE! WE MAY BE
* INVOKED WHILE pmap_init() IS RUNNING!
*/
@ -3554,7 +3554,7 @@ pmap_tlb_shootdown(pmap, va, pte, cpumaskp)
va &= PG_LGFRAME;
#endif
if (pmap_initialized == FALSE || cpus_attached == 0) {
if (pmap_initialized == false || cpus_attached == 0) {
pmap_update_pg(va);
return;
}
@ -3651,7 +3651,7 @@ pmap_tlb_shootdown(pmap, va, pte, cpumaskp)
*
* => called at splipi if MULTIPROCESSOR.
* => called at splvm if !MULTIPROCESSOR.
* => return TRUE if we need to maintain user tlbs.
* => return true if we need to maintain user tlbs.
*/
static inline bool
pmap_do_tlb_shootdown_checktlbstate(struct cpu_info *ci)
@ -3676,9 +3676,9 @@ pmap_do_tlb_shootdown_checktlbstate(struct cpu_info *ci)
}
if (ci->ci_tlbstate == TLBSTATE_STALE)
return FALSE;
return false;
return TRUE;
return true;
}
/*

View File

@ -1,4 +1,4 @@
/* $NetBSD: powernow_k7.c,v 1.23 2007/02/21 22:59:44 thorpej Exp $ */
/* $NetBSD: powernow_k7.c,v 1.24 2007/03/07 21:43:46 thorpej Exp $ */
/* $OpenBSD: powernow-k7.c,v 1.24 2006/06/16 05:58:50 gwk Exp $ */
/*-
@ -66,7 +66,7 @@
/* AMD POWERNOW K7 driver */
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: powernow_k7.c,v 1.23 2007/02/21 22:59:44 thorpej Exp $");
__KERNEL_RCSID(0, "$NetBSD: powernow_k7.c,v 1.24 2007/03/07 21:43:46 thorpej Exp $");
#include <sys/types.h>
#include <sys/param.h>
@ -134,15 +134,15 @@ pnow_cpu_check(uint32_t real_cpusig, uint32_t pst_cpusig)
int j;
if (real_cpusig == pst_cpusig)
return TRUE;
return true;
for (j = 0; pnow_cpu_quirk[j].rcpusig != 0; j++) {
if ((real_cpusig == pnow_cpu_quirk[j].rcpusig) &&
(pst_cpusig == pnow_cpu_quirk[j].pcpusig))
return TRUE;
return true;
}
return FALSE;
return false;
}
int

View File

@ -1,4 +1,4 @@
/* $NetBSD: vm_machdep.c,v 1.128 2007/03/04 05:59:58 christos Exp $ */
/* $NetBSD: vm_machdep.c,v 1.129 2007/03/07 21:43:46 thorpej Exp $ */
/*-
* Copyright (c) 1982, 1986 The Regents of the University of California.
@ -80,7 +80,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: vm_machdep.c,v 1.128 2007/03/04 05:59:58 christos Exp $");
__KERNEL_RCSID(0, "$NetBSD: vm_machdep.c,v 1.129 2007/03/07 21:43:46 thorpej Exp $");
#include "opt_user_ldt.h"
#include "opt_largepages.h"
@ -349,7 +349,7 @@ kvtop(register void *addr)
{
paddr_t pa;
if (pmap_extract(pmap_kernel(), (vaddr_t)addr, &pa) == FALSE)
if (pmap_extract(pmap_kernel(), (vaddr_t)addr, &pa) == false)
panic("kvtop: zero page frame");
return (int)pa;
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: ahc_isa.c,v 1.32 2006/11/16 01:32:38 christos Exp $ */
/* $NetBSD: ahc_isa.c,v 1.33 2007/03/07 21:44:10 thorpej Exp $ */
/*
* Product specific probe and attach routines for:
@ -117,7 +117,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: ahc_isa.c,v 1.32 2006/11/16 01:32:38 christos Exp $");
__KERNEL_RCSID(0, "$NetBSD: ahc_isa.c,v 1.33 2007/03/07 21:44:10 thorpej Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -422,7 +422,7 @@ ahc_isa_attach(struct device *parent, struct device *self, void *aux)
if (ahc_softc_init(ahc) != 0)
goto free_io;
ahc_intr_enable(ahc, FALSE);
ahc_intr_enable(ahc, false);
if (ahc_reset(ahc) != 0)
goto free_io;

View File

@ -28,9 +28,6 @@ History
#include <stdio.h>
#include <stdlib.h>
#define FALSE 0
#define TRUE (!FALSE)
#define SECTORSIZE 512
#define RESET 0
@ -47,7 +44,7 @@ int done;
*/
int handler(void)
{
done = TRUE;
done = true;
return(0);
}
void msg(char (*s))
@ -148,7 +145,7 @@ void main(void)
while (bioskey(1) == 0) ; /* Wait... */
if ((bioskey(0) & 0x7F) == 3) exit(1); /* Check for ^C */
putchar('\n');
done = FALSE;
done = false;
/*
* Determine number of sectors per track and allocate buffers.
*/