Source-Changes-HG archive

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

[src/trunk]: src/sys Remove `volatile' qualifier from argument types of



details:   https://anonhg.NetBSD.org/src/rev/09a471360d84
branches:  trunk
changeset: 749908:09a471360d84
user:      tsutsui <tsutsui%NetBSD.org@localhost>
date:      Sat Dec 12 15:10:34 2009 +0000

description:
Remove `volatile' qualifier from argument types of
struct timeval passed to todr_gettime(9) and todr_settime(9).
We no longer have an ancient and volatile struct timeval `time'
global since we have switched to MI timercounter(9) on all port.

XXX1: some of these RTC drivers still assume 32bit time_t
XXX2: some of these should be rewritten to use todr_[gs]ettime_ymdhms()
XXX3: todr(9) man page doesn't mention todr_[gs]ettime_ymdhms()

diffstat:

 sys/dev/clock_subr.h |  12 +++++-------
 sys/kern/kern_todr.c |  10 +++++-----
 2 files changed, 10 insertions(+), 12 deletions(-)

diffs (78 lines):

diff -r ee2446207e62 -r 09a471360d84 sys/dev/clock_subr.h
--- a/sys/dev/clock_subr.h      Sat Dec 12 14:44:08 2009 +0000
+++ b/sys/dev/clock_subr.h      Sat Dec 12 15:10:34 2009 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: clock_subr.h,v 1.20 2008/04/28 20:23:46 martin Exp $   */
+/*     $NetBSD: clock_subr.h,v 1.21 2009/12/12 15:10:34 tsutsui Exp $  */
 
 /*-
  * Copyright (c) 1996 The NetBSD Foundation, Inc.
@@ -77,10 +77,8 @@
        void    *bus_cookie;    /* Bus specific data */
        time_t  base_time;      /* Base time (e.g. rootfs time) */
 
-       int     (*todr_gettime)(struct todr_chip_handle *,
-                               volatile struct timeval *);
-       int     (*todr_settime)(struct todr_chip_handle *,
-                               volatile struct timeval *);
+       int     (*todr_gettime)(struct todr_chip_handle *, struct timeval *);
+       int     (*todr_settime)(struct todr_chip_handle *, struct timeval *);
        int     (*todr_gettime_ymdhms)(struct todr_chip_handle *,
                                struct clock_ymdhms *);
        int     (*todr_settime_ymdhms)(struct todr_chip_handle *,
@@ -96,8 +94,8 @@
 /*
  * Probably these should evolve into internal routines in kern_todr.c.
  */
-extern int todr_gettime(todr_chip_handle_t tch, volatile struct timeval *);
-extern int todr_settime(todr_chip_handle_t tch, volatile struct timeval *);
+extern int todr_gettime(todr_chip_handle_t tch, struct timeval *);
+extern int todr_settime(todr_chip_handle_t tch, struct timeval *);
 
 /*
  * Machine-dependent function that machine-independent RTC drivers can
diff -r ee2446207e62 -r 09a471360d84 sys/kern/kern_todr.c
--- a/sys/kern/kern_todr.c      Sat Dec 12 14:44:08 2009 +0000
+++ b/sys/kern/kern_todr.c      Sat Dec 12 15:10:34 2009 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: kern_todr.c,v 1.31 2009/12/12 11:35:16 tsutsui Exp $   */
+/*     $NetBSD: kern_todr.c,v 1.32 2009/12/12 15:17:23 tsutsui Exp $   */
 
 /*
  * Copyright (c) 1992, 1993
@@ -76,7 +76,7 @@
  *     @(#)clock.c     8.1 (Berkeley) 6/10/93
  */
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: kern_todr.c,v 1.31 2009/12/12 11:35:16 tsutsui Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_todr.c,v 1.32 2009/12/12 15:17:23 tsutsui Exp $");
 
 #include <sys/param.h>
 #include <sys/kernel.h>
@@ -240,7 +240,7 @@
 #ifdef TODR_DEBUG
 static void
 todr_debug(const char *prefix, int rv, struct clock_ymdhms *dt,
-    volatile struct timeval *tvp)
+    struct timeval *tvp)
 {
        struct timeval tv_val;
        struct clock_ymdhms dt_val;
@@ -268,7 +268,7 @@
 
 
 int
-todr_gettime(todr_chip_handle_t tch, volatile struct timeval *tvp)
+todr_gettime(todr_chip_handle_t tch, struct timeval *tvp)
 {
        struct clock_ymdhms     dt;
        int                     rv;
@@ -317,7 +317,7 @@
 }
 
 int
-todr_settime(todr_chip_handle_t tch, volatile struct timeval *tvp)
+todr_settime(todr_chip_handle_t tch, struct timeval *tvp)
 {
        struct clock_ymdhms     dt;
        int                     rv;



Home | Main Index | Thread Index | Old Index