summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sys/kern/kern_tc.c6
-rw-r--r--sys/kern/kern_time.c4
-rw-r--r--sys/sys/time.h16
-rw-r--r--sys/sys/timetc.h6
4 files changed, 16 insertions, 16 deletions
diff --git a/sys/kern/kern_tc.c b/sys/kern/kern_tc.c
index 2f3f92249ca..9aa44703ac4 100644
--- a/sys/kern/kern_tc.c
+++ b/sys/kern/kern_tc.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: kern_tc.c,v 1.32 2018/04/28 15:44:59 jasper Exp $ */
+/* $OpenBSD: kern_tc.c,v 1.33 2018/05/28 18:05:42 guenther Exp $ */
/*
* Copyright (c) 2000 Poul-Henning Kamp <phk@FreeBSD.org>
@@ -297,7 +297,7 @@ tc_getfrequency(void)
* XXX: not locked.
*/
void
-tc_setrealtimeclock(struct timespec *ts)
+tc_setrealtimeclock(const struct timespec *ts)
{
struct timespec ts2;
struct bintime bt, bt2;
@@ -326,7 +326,7 @@ tc_setrealtimeclock(struct timespec *ts)
* XXX: not locked.
*/
void
-tc_setclock(struct timespec *ts)
+tc_setclock(const struct timespec *ts)
{
struct bintime bt, bt2;
#ifndef SMALL_KERNEL
diff --git a/sys/kern/kern_time.c b/sys/kern/kern_time.c
index 8d6a8333f38..5925c021f04 100644
--- a/sys/kern/kern_time.c
+++ b/sys/kern/kern_time.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: kern_time.c,v 1.102 2018/05/22 18:33:41 cheloha Exp $ */
+/* $OpenBSD: kern_time.c,v 1.103 2018/05/28 18:05:42 guenther Exp $ */
/* $NetBSD: kern_time.c,v 1.20 1996/02/18 11:57:06 fvdl Exp $ */
/*
@@ -63,7 +63,7 @@ int64_t adjtimedelta; /* unapplied time correction (microseconds) */
/* This function is used by clock_settime and settimeofday */
int
-settime(struct timespec *ts)
+settime(const struct timespec *ts)
{
struct timespec now;
diff --git a/sys/sys/time.h b/sys/sys/time.h
index 7bd9994d683..87287590eb4 100644
--- a/sys/sys/time.h
+++ b/sys/sys/time.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: time.h,v 1.37 2017/12/11 23:31:16 jca Exp $ */
+/* $OpenBSD: time.h,v 1.38 2018/05/28 18:05:42 guenther Exp $ */
/* $NetBSD: time.h,v 1.18 1996/04/23 10:29:33 mycroft Exp $ */
/*
@@ -180,7 +180,7 @@ bintime_addx(struct bintime *bt, uint64_t x)
}
static __inline void
-bintime_add(struct bintime *bt, struct bintime *bt2)
+bintime_add(struct bintime *bt, const struct bintime *bt2)
{
uint64_t u;
@@ -192,7 +192,7 @@ bintime_add(struct bintime *bt, struct bintime *bt2)
}
static __inline void
-bintime_sub(struct bintime *bt, struct bintime *bt2)
+bintime_sub(struct bintime *bt, const struct bintime *bt2)
{
uint64_t u;
@@ -218,7 +218,7 @@ bintime_sub(struct bintime *bt, struct bintime *bt2)
*/
static __inline void
-bintime2timespec(struct bintime *bt, struct timespec *ts)
+bintime2timespec(const struct bintime *bt, struct timespec *ts)
{
ts->tv_sec = bt->sec;
@@ -226,7 +226,7 @@ bintime2timespec(struct bintime *bt, struct timespec *ts)
}
static __inline void
-timespec2bintime(struct timespec *ts, struct bintime *bt)
+timespec2bintime(const struct timespec *ts, struct bintime *bt)
{
bt->sec = ts->tv_sec;
@@ -235,7 +235,7 @@ timespec2bintime(struct timespec *ts, struct bintime *bt)
}
static __inline void
-bintime2timeval(struct bintime *bt, struct timeval *tv)
+bintime2timeval(const struct bintime *bt, struct timeval *tv)
{
tv->tv_sec = bt->sec;
@@ -243,7 +243,7 @@ bintime2timeval(struct bintime *bt, struct timeval *tv)
}
static __inline void
-timeval2bintime(struct timeval *tv, struct bintime *bt)
+timeval2bintime(const struct timeval *tv, struct bintime *bt)
{
bt->sec = (time_t)tv->tv_sec;
@@ -296,7 +296,7 @@ int timespecfix(struct timespec *);
int itimerfix(struct timeval *);
int itimerdecr(struct itimerval *itp, int usec);
void itimerround(struct timeval *);
-int settime(struct timespec *);
+int settime(const struct timespec *);
int ratecheck(struct timeval *, const struct timeval *);
int ppsratecheck(struct timeval *, int *, int);
diff --git a/sys/sys/timetc.h b/sys/sys/timetc.h
index 0d3e4e3ae61..90b291d01cf 100644
--- a/sys/sys/timetc.h
+++ b/sys/sys/timetc.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: timetc.h,v 1.5 2014/04/03 17:58:31 beck Exp $ */
+/* $OpenBSD: timetc.h,v 1.6 2018/05/28 18:05:42 guenther Exp $ */
/*
* Copyright (c) 2000 Poul-Henning Kamp <phk@FreeBSD.org>
@@ -81,8 +81,8 @@ extern struct timecounter *timecounter;
u_int64_t tc_getfrequency(void);
void tc_init(struct timecounter *tc);
-void tc_setclock(struct timespec *ts);
-void tc_setrealtimeclock(struct timespec *ts);
+void tc_setclock(const struct timespec *ts);
+void tc_setrealtimeclock(const struct timespec *ts);
void tc_ticktock(void);
void inittimecounter(void);
int sysctl_tc(int *, u_int, void *, size_t *, void *, size_t);