Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/kern ifdef a variable like its use



details:   https://anonhg.NetBSD.org/src/rev/b30766cdb711
branches:  trunk
changeset: 790000:b30766cdb711
user:      martin <martin%NetBSD.org@localhost>
date:      Sat Sep 14 20:52:43 2013 +0000

description:
ifdef a variable like its use

diffstat:

 sys/kern/kern_tc.c |  13 ++++++++++---
 1 files changed, 10 insertions(+), 3 deletions(-)

diffs (49 lines):

diff -r a7b928a89272 -r b30766cdb711 sys/kern/kern_tc.c
--- a/sys/kern/kern_tc.c        Sat Sep 14 20:49:31 2013 +0000
+++ b/sys/kern/kern_tc.c        Sat Sep 14 20:52:43 2013 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: kern_tc.c,v 1.45 2013/05/26 18:07:42 kardel Exp $ */
+/* $NetBSD: kern_tc.c,v 1.46 2013/09/14 20:52:43 martin Exp $ */
 
 /*-
  * Copyright (c) 2008, 2009 The NetBSD Foundation, Inc.
@@ -40,7 +40,7 @@
 
 #include <sys/cdefs.h>
 /* __FBSDID("$FreeBSD: src/sys/kern/kern_tc.c,v 1.166 2005/09/19 22:16:31 andre Exp $"); */
-__KERNEL_RCSID(0, "$NetBSD: kern_tc.c,v 1.45 2013/05/26 18:07:42 kardel Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_tc.c,v 1.46 2013/09/14 20:52:43 martin Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_ntp.h"
@@ -992,7 +992,10 @@
        struct timespec ts, *tsp, *osp;
        struct timehands *th;
        u_int64_t tcount, acount, dcount, *pcount;
-       int foff, fhard, gen;
+       int foff, gen;
+#ifdef PPS_SYNC
+       int fhard;
+#endif
        pps_seq_t *pseq;
 
        KASSERT(mutex_owned(&timecounter_lock));
@@ -1049,14 +1052,18 @@
                tsp = &pps->ppsinfo.assert_timestamp;
                osp = &pps->ppsparam.assert_offset;
                foff = pps->ppsparam.mode & PPS_OFFSETASSERT;
+#ifdef PPS_SYNC
                fhard = pps->kcmode & PPS_CAPTUREASSERT;
+#endif
                pcount = &pps->ppscount[0];
                pseq = &pps->ppsinfo.assert_sequence;
        } else {
                tsp = &pps->ppsinfo.clear_timestamp;
                osp = &pps->ppsparam.clear_offset;
                foff = pps->ppsparam.mode & PPS_OFFSETCLEAR;
+#ifdef PPS_SYNC
                fhard = pps->kcmode & PPS_CAPTURECLEAR;
+#endif
                pcount = &pps->ppscount[1];
                pseq = &pps->ppsinfo.clear_sequence;
        }



Home | Main Index | Thread Index | Old Index