summaryrefslogtreecommitdiffstats
path: root/cpukit/include/rtems/linkersets.h
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--cpukit/include/rtems/linkersets.h52
1 files changed, 41 insertions, 11 deletions
diff --git a/cpukit/include/rtems/linkersets.h b/cpukit/include/rtems/linkersets.h
index cdfcd54cde..a5d7b1b037 100644
--- a/cpukit/include/rtems/linkersets.h
+++ b/cpukit/include/rtems/linkersets.h
@@ -1,7 +1,15 @@
/* SPDX-License-Identifier: BSD-2-Clause */
+/**
+ * @file
+ *
+ * @ingroup RTEMSAPILinkerSets
+ *
+ * @brief This header file provides the linker sets API.
+ */
+
/*
- * Copyright (c) 2015, 2020 embedded brains GmbH. All rights reserved.
+ * Copyright (C) 2015, 2020 embedded brains GmbH & Co. KG
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -34,6 +42,36 @@
extern "C" {
#endif /* __cplusplus */
+/**
+ * @ingroup RTEMSImpl
+ *
+ * @brief Obfuscates a pointer to prevent compiler optimizations.
+ *
+ * @param ptr is the pointer to obfuscate.
+ *
+ * @return Returns the unsigned integer representation of the obfuscated
+ * pointer.
+ */
+static inline uintptr_t _Linker_set_Obfuscate( const void *ptr )
+{
+ uintptr_t addr;
+
+ addr = (uintptr_t) ptr;
+ RTEMS_OBFUSCATE_VARIABLE( addr );
+
+ return addr;
+}
+
+/**
+ * @defgroup RTEMSAPILinkerSets Linker Sets
+ *
+ * @ingroup RTEMSAPI
+ *
+ * @brief This group contains the linker sets API.
+ *
+ * @{
+ */
+
#define RTEMS_LINKER_SET_BEGIN( set ) \
_Linker_set_##set##_begin
@@ -129,16 +167,6 @@ extern "C" {
decl \
RTEMS_SECTION( ".rtemsrwset." #set ".content" )
-RTEMS_INLINE_ROUTINE uintptr_t _Linker_set_Obfuscate( const void *ptr )
-{
- uintptr_t addr;
-
- addr = (uintptr_t) ptr;
- RTEMS_OBFUSCATE_VARIABLE( addr );
-
- return addr;
-}
-
#define RTEMS_LINKER_SET_SIZE( set ) \
( _Linker_set_Obfuscate( RTEMS_LINKER_SET_END( set ) ) \
- _Linker_set_Obfuscate( RTEMS_LINKER_SET_BEGIN( set ) ) )
@@ -157,6 +185,8 @@ RTEMS_INLINE_ROUTINE uintptr_t _Linker_set_Obfuscate( const void *ptr )
++item \
)
+/** @} */
+
#ifdef __cplusplus
}
#endif /* __cplusplus */