Module Name: src
Committed By: riastradh
Date: Sun May 3 01:20:37 UTC 2020
Modified Files:
src/sys/sys: timevar.h
Log Message:
Define DEFAULT_TIMEOUT_EPSILON for cv_timedwaitbt.
For now, it is roughly one bintime's worth of ticks.
This is about the smallest difference between wait periods we can
rely on at the moment; in the glorious tickless future we can revisit
this.
To generate a diff of this commit:
cvs rdiff -u -r1.40 -r1.41 src/sys/sys/timevar.h
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/sys/timevar.h
diff -u src/sys/sys/timevar.h:1.40 src/sys/sys/timevar.h:1.41
--- src/sys/sys/timevar.h:1.40 Thu Jan 2 15:42:27 2020
+++ src/sys/sys/timevar.h Sun May 3 01:20:37 2020
@@ -1,4 +1,4 @@
-/* $NetBSD: timevar.h,v 1.40 2020/01/02 15:42:27 thorpej Exp $ */
+/* $NetBSD: timevar.h,v 1.41 2020/05/03 01:20:37 riastradh Exp $ */
/*
* Copyright (c) 2005, 2008 The NetBSD Foundation.
@@ -195,6 +195,12 @@ bool time_wraps(struct timespec *, struc
extern volatile time_t time_second; /* current second in the epoch */
extern volatile time_t time_uptime; /* system uptime in seconds */
+#define DEFAULT_TIMEOUT_EPSILON \
+ (&(const struct bintime) { \
+ .sec = 0, \
+ .frac = ((uint64_t)1 << 32)/hz << 32, \
+ })
+
static __inline time_t time_mono_to_wall(time_t t)
{