summaryrefslogtreecommitdiffstats
path: root/cpukit/include/machine/_kernel_time.h
diff options
context:
space:
mode:
Diffstat (limited to 'cpukit/include/machine/_kernel_time.h')
-rw-r--r--cpukit/include/machine/_kernel_time.h35
1 files changed, 28 insertions, 7 deletions
diff --git a/cpukit/include/machine/_kernel_time.h b/cpukit/include/machine/_kernel_time.h
index f0b6bdfc47..9279c1238a 100644
--- a/cpukit/include/machine/_kernel_time.h
+++ b/cpukit/include/machine/_kernel_time.h
@@ -1,6 +1,10 @@
/*-
- * Copyright (c) 2016 embedded brains GmbH
- * All rights reserved.
+ * SPDX-License-Identifier: BSD-3-Clause
+ *
+ * Copyright (C) 2016 embedded brains GmbH & Co. KG
+ *
+ * Copyright (c) 1982, 1986, 1993
+ * The Regents of the University of California. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -10,11 +14,14 @@
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
+ * 3. Neither the name of the University nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
*
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
@@ -22,11 +29,21 @@
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
+ *
+ * @(#)time.h 8.5 (Berkeley) 5/4/95
+ * $FreeBSD$
*/
-#if !defined(_SYS_TIME_H_) || !defined(_KERNEL)
-#error "must be included via <sys/time.h> in kernel space"
-#endif
+/**
+ * @file
+ *
+ * @ingroup RTEMSImplFreeBSDKernel
+ *
+ * @brief This header file provides time definitions for the kernel space
+ * (_KERNEL is defined before including <sys/time.h>).
+ */
+
+#if defined(_SYS_TIME_H_) && defined(_KERNEL)
#include <machine/_timecounter.h>
@@ -199,3 +216,7 @@ int tvtohz(struct timeval *tv);
#define TIMESEL(sbt, sbt2) \
(((sbt2) >= sbt_timethreshold) ? \
((*(sbt) = getsbinuptime()), 1) : ((*(sbt) = sbinuptime()), 0))
+
+#else /* !_SYS_TIME_H_ || !_KERNEL */
+#error "must be included via <sys/time.h> in kernel space"
+#endif /* _SYS_TIME_H_ && _KERNEL */