summaryrefslogtreecommitdiffstats
path: root/cpukit/include/machine
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--cpukit/include/machine/_kernel_cpuset.h4
-rw-r--r--cpukit/include/machine/_kernel_in.h16
-rw-r--r--cpukit/include/machine/_kernel_in6.h11
-rw-r--r--cpukit/include/machine/_kernel_mman.h4
-rw-r--r--cpukit/include/machine/_kernel_param.h12
-rw-r--r--cpukit/include/machine/_kernel_time.h12
-rw-r--r--cpukit/include/machine/_kernel_types.h12
-rw-r--r--cpukit/include/machine/_kernel_uio.h14
-rw-r--r--cpukit/include/machine/_timecounter.h4
9 files changed, 61 insertions, 28 deletions
diff --git a/cpukit/include/machine/_kernel_cpuset.h b/cpukit/include/machine/_kernel_cpuset.h
index 19c1a3e504..1164494b9e 100644
--- a/cpukit/include/machine/_kernel_cpuset.h
+++ b/cpukit/include/machine/_kernel_cpuset.h
@@ -3,12 +3,14 @@
/**
* @file
*
+ * @ingroup RTEMSImplFreeBSDKernel
+ *
* @brief This header file provides CPU set definitions for the kernel space
* (_KERNEL is defined before including <sys/cpuset.h>).
*/
/*
- * Copyright (C) 2016 embedded brains GmbH
+ * Copyright (C) 2016 embedded brains GmbH & Co. KG
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
diff --git a/cpukit/include/machine/_kernel_in.h b/cpukit/include/machine/_kernel_in.h
index 29a6112e96..1c7ad25565 100644
--- a/cpukit/include/machine/_kernel_in.h
+++ b/cpukit/include/machine/_kernel_in.h
@@ -35,13 +35,13 @@
/**
* @file
*
+ * @ingroup RTEMSImplFreeBSDKernel
+ *
* @brief This header file provides IPv4 definitions for the kernel space
* (_KERNEL is defined before including <netinet/in.h>).
*/
-#if !defined(_NETINET_IN_H_) || !defined(_KERNEL)
-#error "must be included via <netinet/in.h> in kernel space"
-#endif
+#if defined(_NETINET_IN_H_) && defined(_KERNEL)
struct ifnet; struct mbuf; /* forward declarations for Standard C */
struct in_ifaddr;
@@ -50,8 +50,14 @@ int in_broadcast(struct in_addr, struct ifnet *);
int in_ifaddr_broadcast(struct in_addr, struct in_ifaddr *);
int in_canforward(struct in_addr);
int in_localaddr(struct in_addr);
+#if __FreeBSD_version >= 1400039
+bool in_localip(struct in_addr);
+#else
int in_localip(struct in_addr);
+#endif
+bool in_localip_fib(struct in_addr, uint16_t);
int in_ifhasaddr(struct ifnet *, struct in_addr);
+struct in_ifaddr *in_findlocal(uint32_t, bool);
int inet_aton(const char *, struct in_addr *); /* in libkern */
char *inet_ntoa_r(struct in_addr ina, char *buf); /* in libkern */
char *inet_ntop(int, const void *, char *, socklen_t); /* in libkern */
@@ -65,3 +71,7 @@ void in_ifdetach(struct ifnet *);
#define satosin(sa) ((struct sockaddr_in *)(sa))
#define sintosa(sin) ((struct sockaddr *)(sin))
#define ifatoia(ifa) ((struct in_ifaddr *)(ifa))
+
+#else /* !_NETINET_IN_H_ || !_KERNEL */
+#error "must be included via <netinet/in.h> in kernel space"
+#endif /* _NETINET_IN_H_ && _KERNEL */
diff --git a/cpukit/include/machine/_kernel_in6.h b/cpukit/include/machine/_kernel_in6.h
index c2b603fb36..e198e5d37a 100644
--- a/cpukit/include/machine/_kernel_in6.h
+++ b/cpukit/include/machine/_kernel_in6.h
@@ -34,13 +34,13 @@
/**
* @file
*
+ * @ingroup RTEMSImplFreeBSDKernel
+ *
* @brief This header file provides IPv6 definitions for the kernel space
* (_KERNEL is defined before including <netinet6/in6.h>).
*/
-#if !defined(_NETINET6_IN6_H_) || !defined(_KERNEL)
-#error "must be included via <netinet6/in6.h> in kernel space"
-#endif
+#if defined(_NETINET6_IN6_H_) && defined(_KERNEL)
/* XXX nonstandard */
#define s6_addr8 __u6_addr.__u6_addr8
@@ -167,6 +167,7 @@ int in6_cksum_partial(struct mbuf *, u_int8_t, u_int32_t, u_int32_t,
u_int32_t);
int in6_localaddr(struct in6_addr *);
int in6_localip(struct in6_addr *);
+bool in6_localip_fib(struct in6_addr *, uint16_t);
int in6_ifhasaddr(struct ifnet *, struct in6_addr *);
int in6_addrscope(const struct in6_addr *);
char *ip6_sprintf(char *, const struct in6_addr *);
@@ -186,3 +187,7 @@ extern void addrsel_policy_init(void);
#define satosin6(sa) ((struct sockaddr_in6 *)(sa))
#define sin6tosa(sin6) ((struct sockaddr *)(sin6))
#define ifatoia6(ifa) ((struct in6_ifaddr *)(ifa))
+
+#else /* !_NETINET6_IN6_H_ || !_KERNEL */
+#error "must be included via <netinet6/in6.h> in kernel space"
+#endif /* _NETINET6_IN6_H_ && _KERNEL */
diff --git a/cpukit/include/machine/_kernel_mman.h b/cpukit/include/machine/_kernel_mman.h
index fa2677a122..325142f9f3 100644
--- a/cpukit/include/machine/_kernel_mman.h
+++ b/cpukit/include/machine/_kernel_mman.h
@@ -3,12 +3,14 @@
/**
* @file
*
+ * @ingroup RTEMSImplFreeBSDKernel
+ *
* @brief This header file provides memory map definitions for the kernel space
* (_KERNEL is defined before including <sys/mman.h>).
*/
/*
- * Copyright (C) 2016 embedded brains GmbH
+ * Copyright (C) 2016 embedded brains GmbH & Co. KG
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
diff --git a/cpukit/include/machine/_kernel_param.h b/cpukit/include/machine/_kernel_param.h
index 5b381ccca5..bda6008822 100644
--- a/cpukit/include/machine/_kernel_param.h
+++ b/cpukit/include/machine/_kernel_param.h
@@ -3,12 +3,14 @@
/**
* @file
*
+ * @ingroup RTEMSImplFreeBSDKernel
+ *
* @brief This header file provides parameter definitions for the kernel space
* (_KERNEL is defined before including <sys/param.h>).
*/
/*
- * Copyright (C) 2017 embedded brains GmbH
+ * Copyright (C) 2017 embedded brains GmbH & Co. KG
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -37,9 +39,7 @@
#include <sys/time.h>
#include <sys/priority.h>
-#if !defined(_SYS_PARAM_H_) || !defined(_KERNEL)
-#error "must be included via <sys/param.h> in kernel space"
-#endif
+#if defined(_SYS_PARAM_H_) && defined(_KERNEL)
#ifndef FALSE
#define FALSE 0
@@ -65,3 +65,7 @@ __END_DECLS
#define ntohl(x) __ntohl(x)
#define ntohs(x) __ntohs(x)
#endif /* !_BYTEORDER_FUNC_DEFINED */
+
+#else /* !_SYS_PARAM_H_ || !_KERNEL */
+#error "must be included via <sys/param.h> in kernel space"
+#endif /* _SYS_PARAM_H_ && _KERNEL */
diff --git a/cpukit/include/machine/_kernel_time.h b/cpukit/include/machine/_kernel_time.h
index cfd223f0b6..9279c1238a 100644
--- a/cpukit/include/machine/_kernel_time.h
+++ b/cpukit/include/machine/_kernel_time.h
@@ -1,7 +1,7 @@
/*-
* SPDX-License-Identifier: BSD-3-Clause
*
- * Copyright (C) 2016 embedded brains GmbH
+ * Copyright (C) 2016 embedded brains GmbH & Co. KG
*
* Copyright (c) 1982, 1986, 1993
* The Regents of the University of California. All rights reserved.
@@ -37,13 +37,13 @@
/**
* @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)
-#error "must be included via <sys/time.h> in kernel space"
-#endif
+#if defined(_SYS_TIME_H_) && defined(_KERNEL)
#include <machine/_timecounter.h>
@@ -216,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 */
diff --git a/cpukit/include/machine/_kernel_types.h b/cpukit/include/machine/_kernel_types.h
index 98f0366b64..c65e51d8cf 100644
--- a/cpukit/include/machine/_kernel_types.h
+++ b/cpukit/include/machine/_kernel_types.h
@@ -3,12 +3,14 @@
/**
* @file
*
+ * @ingroup RTEMSImplFreeBSDKernel
+ *
* @brief This header file provides type definitions for the kernel space
* (_KERNEL is defined before including <sys/types.h>).
*/
/*
- * Copyright (C) 2016 embedded brains GmbH
+ * Copyright (C) 2016 embedded brains GmbH & Co. KG
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -32,9 +34,7 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
-#if !defined(_SYS_TYPES_H) || !defined(_KERNEL)
-#error "must be included via <sys/types.h> in kernel space"
-#endif
+#if defined(_SYS_TYPES_H) && defined(_KERNEL)
#include <stdbool.h>
@@ -42,3 +42,7 @@ typedef int boolean_t;
typedef struct device *device_t;
typedef char vm_memattr_t;
typedef struct vm_page *vm_page_t;
+
+#else /* !_SYS_TYPES_H || !_KERNEL */
+#error "must be included via <sys/types.h> in kernel space"
+#endif /* _SYS_TYPES_H && _KERNEL */
diff --git a/cpukit/include/machine/_kernel_uio.h b/cpukit/include/machine/_kernel_uio.h
index 7e45a28c16..8e368770f1 100644
--- a/cpukit/include/machine/_kernel_uio.h
+++ b/cpukit/include/machine/_kernel_uio.h
@@ -35,13 +35,13 @@
/**
* @file
*
+ * @ingroup RTEMSImplFreeBSDKernel
+ *
* @brief This header file provides device driver I/O definitions for the
* kernel space (_KERNEL is defined before including <sys/uio.h>).
*/
-#if !defined(_SYS_UIO_H_) || !defined(_KERNEL)
-#error "must be included via <sys/uio.h> in kernel space"
-#endif
+#if defined(_SYS_UIO_H_) && defined(_KERNEL)
struct uio {
struct iovec *uio_iov; /* scatter/gather list */
@@ -71,12 +71,8 @@ struct vm_page;
struct bus_dma_segment;
struct uio *cloneuio(struct uio *uiop);
-int copyinfrom(const void * __restrict src, void * __restrict dst,
- size_t len, int seg);
int copyiniov(const struct iovec *iovp, u_int iovcnt, struct iovec **iov,
int error);
-int copyinstrfrom(const void * __restrict src, void * __restrict dst,
- size_t len, size_t * __restrict copied, int seg);
int copyinuio(const struct iovec *iovp, u_int iovcnt, struct uio **uiop);
int copyout_map(struct thread *td, vm_offset_t *addr, size_t sz);
int copyout_unmap(struct thread *td, vm_offset_t addr, size_t sz);
@@ -92,3 +88,7 @@ int uiomove_fromphys(struct vm_page *ma[], vm_offset_t offset, int n,
struct uio *uio);
int uiomove_nofault(void *cp, int n, struct uio *uio);
int uiomove_object(struct vm_object *obj, off_t obj_size, struct uio *uio);
+
+#else /* !_SYS_UIO_H_ || !_KERNEL */
+#error "must be included via <sys/uio.h> in kernel space"
+#endif /* _SYS_UIO_H_ && _KERNEL */
diff --git a/cpukit/include/machine/_timecounter.h b/cpukit/include/machine/_timecounter.h
index fc3d78c5ad..e20e051f84 100644
--- a/cpukit/include/machine/_timecounter.h
+++ b/cpukit/include/machine/_timecounter.h
@@ -3,12 +3,14 @@
/**
* @file
*
+ * @ingroup RTEMSScoreTimecounter
+ *
* @brief This header file provides timecounter definitions for the kernel space
* (_KERNEL is defined before including <sys/time.h>) and RTEMS.
*/
/*
- * Copyright (C) 2016 embedded brains GmbH
+ * Copyright (C) 2016 embedded brains GmbH & Co. KG
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions