summaryrefslogtreecommitdiffstats
path: root/sys/sys
diff options
context:
space:
mode:
authorlstewart <lstewart@FreeBSD.org>2011-11-29 06:53:36 +0000
committerlstewart <lstewart@FreeBSD.org>2011-11-29 06:53:36 +0000
commitd76140d56b49a0146cbcc625f37cbd69ddb014c9 (patch)
treec64d1e3441040861019b606e1639dec2f4fc11c9 /sys/sys
parent4eea9e0d09881cbd3972ea1e76f791727cd3e911 (diff)
downloadFreeBSD-src-d76140d56b49a0146cbcc625f37cbd69ddb014c9.zip
FreeBSD-src-d76140d56b49a0146cbcc625f37cbd69ddb014c9.tar.gz
Make the fbclock_[get]{bin,nano,micro}[up]time() function prototypes public so
that new APIs with some performance sensitivity can be built on top of them. These functions should not be called directly except in special circumstances. Committed on behalf of Julien Ridoux and Darryl Veitch from the University of Melbourne, Australia, as part of the FreeBSD Foundation funded "Feed-Forward Clock Synchronization Algorithms" project. For more information, see http://www.synclab.org/radclock/ Discussed with: Julien Ridoux (jridoux at unimelb edu au) Submitted by: Julien Ridoux (jridoux at unimelb edu au)
Diffstat (limited to 'sys/sys')
-rw-r--r--sys/sys/timeffc.h22
1 files changed, 22 insertions, 0 deletions
diff --git a/sys/sys/timeffc.h b/sys/sys/timeffc.h
index 0c58c05..fcf41ed 100644
--- a/sys/sys/timeffc.h
+++ b/sys/sys/timeffc.h
@@ -164,6 +164,28 @@ void ffclock_bindifftime(ffcounter ffdelta, struct bintime *bt);
void ffclock_nanodifftime(ffcounter ffdelta, struct timespec *tsp);
void ffclock_microdifftime(ffcounter ffdelta, struct timeval *tvp);
+/*
+ * When FFCLOCK is enabled in the kernel, [get]{bin,nano,micro}[up]time() become
+ * wrappers around equivalent feedback or feed-forward functions. Provide access
+ * outside of kern_tc.c to the feedback clock equivalent functions for
+ * specialised use i.e. these are not for general consumption.
+ */
+void fbclock_bintime(struct bintime *bt);
+void fbclock_nanotime(struct timespec *tsp);
+void fbclock_microtime(struct timeval *tvp);
+
+void fbclock_getbintime(struct bintime *bt);
+void fbclock_getnanotime(struct timespec *tsp);
+void fbclock_getmicrotime(struct timeval *tvp);
+
+void fbclock_binuptime(struct bintime *bt);
+void fbclock_nanouptime(struct timespec *tsp);
+void fbclock_microuptime(struct timeval *tvp);
+
+void fbclock_getbinuptime(struct bintime *bt);
+void fbclock_getnanouptime(struct timespec *tsp);
+void fbclock_getmicrouptime(struct timeval *tvp);
+
#else /* !_KERNEL */
/* Feed-Forward Clock system calls. */
OpenPOWER on IntegriCloud