summaryrefslogtreecommitdiffstats
path: root/sys/dev/hwpmc/hwpmc_mod.c
diff options
context:
space:
mode:
authorru <ru@FreeBSD.org>2005-12-05 11:58:35 +0000
committerru <ru@FreeBSD.org>2005-12-05 11:58:35 +0000
commit9b19d72862ec030327b619472a0fdd12ace7a4c0 (patch)
tree10fbb6249e1553ff873a2885f2937b146e545698 /sys/dev/hwpmc/hwpmc_mod.c
parent6bc69ac5efced12523ecf09740467f0e992166c5 (diff)
downloadFreeBSD-src-9b19d72862ec030327b619472a0fdd12ace7a4c0.zip
FreeBSD-src-9b19d72862ec030327b619472a0fdd12ace7a4c0.tar.gz
Fix -Wundef warnings found when compiling i386 LINT, GENERIC and
custom kernels.
Diffstat (limited to 'sys/dev/hwpmc/hwpmc_mod.c')
-rw-r--r--sys/dev/hwpmc/hwpmc_mod.c28
1 files changed, 14 insertions, 14 deletions
diff --git a/sys/dev/hwpmc/hwpmc_mod.c b/sys/dev/hwpmc/hwpmc_mod.c
index ecd83d2..85b5fa0 100644
--- a/sys/dev/hwpmc/hwpmc_mod.c
+++ b/sys/dev/hwpmc/hwpmc_mod.c
@@ -150,7 +150,7 @@ static LIST_HEAD(, pmc_owner) pmc_ss_owners;
* Prototypes
*/
-#if DEBUG
+#ifdef DEBUG
static int pmc_debugflags_sysctl_handler(SYSCTL_HANDLER_ARGS);
static int pmc_debugflags_parse(char *newstr, char *fence);
#endif
@@ -202,7 +202,7 @@ static void pmc_unlink_target_process(struct pmc *pmc,
SYSCTL_NODE(_kern, OID_AUTO, hwpmc, CTLFLAG_RW, 0, "HWPMC parameters");
-#if DEBUG
+#ifdef DEBUG
struct pmc_debugflags pmc_debugflags = PMC_DEBUG_DEFAULT_FLAGS;
char pmc_debugstr[PMC_DEBUG_STRSIZE];
TUNABLE_STR(PMC_SYSCTL_NAME_PREFIX "debugflags", pmc_debugstr,
@@ -301,7 +301,7 @@ static moduledata_t pmc_mod = {
DECLARE_MODULE(pmc, pmc_mod, SI_SUB_SMP, SI_ORDER_ANY);
MODULE_VERSION(pmc, PMC_VERSION);
-#if DEBUG
+#ifdef DEBUG
enum pmc_dbgparse_state {
PMCDS_WS, /* in whitespace */
PMCDS_MAJOR, /* seen a major keyword */
@@ -757,7 +757,7 @@ pmc_link_target_process(struct pmc *pm, struct pmc_process *pp)
PMCDBG(PRC,TLK,1, "link-target pmc=%p ri=%d pmc-process=%p",
pm, ri, pp);
-#if DEBUG
+#ifdef DEBUG
LIST_FOREACH(pt, &pm->pm_targets, pt_next)
if (pt->pt_process == pp)
KASSERT(0, ("[pmc,%d] pp %p already in pmc %p targets",
@@ -1415,7 +1415,7 @@ pmc_process_csw_out(struct thread *td)
*/
-#if DEBUG
+#ifdef DEBUG
const char *pmc_hooknames[] = {
"",
"EXIT",
@@ -1584,7 +1584,7 @@ pmc_hook_handler(struct thread *td, int function, void *arg)
break;
default:
-#if DEBUG
+#ifdef DEBUG
KASSERT(0, ("[pmc,%d] unknown hook %d\n", __LINE__, function));
#endif
break;
@@ -1766,7 +1766,7 @@ pmc_destroy_pmc_descriptor(struct pmc *pm)
{
(void) pm;
-#if DEBUG
+#ifdef DEBUG
KASSERT(pm->pm_state == PMC_STATE_DELETED ||
pm->pm_state == PMC_STATE_FREE,
("[pmc,%d] destroying non-deleted PMC", __LINE__));
@@ -1783,7 +1783,7 @@ pmc_destroy_pmc_descriptor(struct pmc *pm)
static void
pmc_wait_for_pmc_idle(struct pmc *pm)
{
-#if DEBUG
+#ifdef DEBUG
volatile int maxloop;
maxloop = 100 * mp_ncpus;
@@ -1794,7 +1794,7 @@ pmc_wait_for_pmc_idle(struct pmc *pm)
* comes down to zero.
*/
while (atomic_load_acq_32(&pm->pm_runcount) > 0) {
-#if DEBUG
+#ifdef DEBUG
maxloop--;
KASSERT(maxloop > 0,
("[pmc,%d] (ri%d, rc%d) waiting too long for "
@@ -2344,7 +2344,7 @@ pmc_stop(struct pmc *pm)
}
-#if DEBUG
+#ifdef DEBUG
static const char *pmc_op_to_name[] = {
#undef __PMC_OP
#define __PMC_OP(N, D) #N ,
@@ -3282,7 +3282,7 @@ pmc_syscall_handler(struct thread *td, void *syscall_args)
pprw = (struct pmc_op_pmcrw *) arg;
-#if DEBUG
+#ifdef DEBUG
if (prw.pm_flags & PMC_F_NEWVALUE)
PMCDBG(PMC,OPS,2, "rw id=%d new %jx -> old %jx",
ri, prw.pm_value, oldvalue);
@@ -3921,7 +3921,7 @@ pmc_initialize(void)
md = NULL;
error = 0;
-#if DEBUG
+#ifdef DEBUG
/* parse debug flags first */
if (TUNABLE_STR_FETCH(PMC_SYSCTL_NAME_PREFIX "debugflags",
pmc_debugstr, sizeof(pmc_debugstr)))
@@ -4071,7 +4071,7 @@ pmc_cleanup(void)
struct pmc_ownerhash *ph;
struct pmc_owner *po, *tmp;
struct pmc_binding pb;
-#if DEBUG
+#ifdef DEBUG
struct pmc_processhash *prh;
#endif
@@ -4121,7 +4121,7 @@ pmc_cleanup(void)
mtx_destroy(&pmc_processhash_mtx);
if (pmc_processhash) {
-#if DEBUG
+#ifdef DEBUG
struct pmc_process *pp;
PMCDBG(MOD,INI,3, "%s", "destroy process hash");
OpenPOWER on IntegriCloud