<div dir="ltr">OK. Makes sense based on what appears to be coming.</div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Mar 3, 2016 at 8:47 AM, Sebastian Huber <span dir="ltr"><<a href="mailto:sebastian.huber@embedded-brains.de" target="_blank">sebastian.huber@embedded-brains.de</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">---<br>
cpukit/score/Makefile.am | 1 +<br>
cpukit/score/include/rtems/score/processormask.h | 90 ++++++++++++++++++++++++<br>
cpukit/score/<a href="http://preinstall.am" rel="noreferrer" target="_blank">preinstall.am</a> | 4 ++<br>
3 files changed, 95 insertions(+)<br>
create mode 100644 cpukit/score/include/rtems/score/processormask.h<br>
<br>
diff --git a/cpukit/score/Makefile.am b/cpukit/score/Makefile.am<br>
index 8506f22..3d3f1c1 100644<br>
--- a/cpukit/score/Makefile.am<br>
+++ b/cpukit/score/Makefile.am<br>
@@ -61,6 +61,7 @@ include_rtems_score_HEADERS += include/rtems/score/priority.h<br>
include_rtems_score_HEADERS += include/rtems/score/prioritybitmap.h<br>
include_rtems_score_HEADERS += include/rtems/score/prioritybitmapimpl.h<br>
include_rtems_score_HEADERS += include/rtems/score/profiling.h<br>
+include_rtems_score_HEADERS += include/rtems/score/processormask.h<br>
include_rtems_score_HEADERS += include/rtems/score/rbtree.h<br>
include_rtems_score_HEADERS += include/rtems/score/rbtreeimpl.h<br>
include_rtems_score_HEADERS += include/rtems/score/resource.h<br>
diff --git a/cpukit/score/include/rtems/score/processormask.h b/cpukit/score/include/rtems/score/processormask.h<br>
new file mode 100644<br>
index 0000000..5a78dd3<br>
--- /dev/null<br>
+++ b/cpukit/score/include/rtems/score/processormask.h<br>
@@ -0,0 +1,90 @@<br>
+/**<br>
+ * @file<br>
+ *<br>
+ * @brief Processor Mask API<br>
+ *<br>
+ * @ingroup ScoreProcessorMask<br>
+ */<br>
+<br>
+/*<br>
+ * Copyright (c) 2016 embedded brains GmbH. All rights reserved.<br>
+ *<br>
+ * embedded brains GmbH<br>
+ * Dornierstr. 4<br>
+ * 82178 Puchheim<br>
+ * Germany<br>
+ * <<a href="mailto:rtems@embedded-brains.de">rtems@embedded-brains.de</a>><br>
+ *<br>
+ * The license and distribution terms for this file may be<br>
+ * found in the file LICENSE in this distribution or at<br>
+ * <a href="http://www.rtems.org/license/LICENSE" rel="noreferrer" target="_blank">http://www.rtems.org/license/LICENSE</a>.<br>
+ */<br>
+<br>
+#ifndef _RTEMS_SCORE_PROCESSORMASK_H<br>
+#define _RTEMS_SCORE_PROCESSORMASK_H<br>
+<br>
+#include <rtems/score/cpu.h><br>
+<br>
+#ifdef __cplusplus<br>
+extern "C" {<br>
+#endif /* __cplusplus */<br>
+<br>
+/**<br>
+ * @defgroup ScoreProcessorMask Processor Mask<br>
+ *<br>
+ * @ingroup Score<br>
+ *<br>
+ * The processor mask provides a bit map large enough to provide one bit for<br>
+ * each processor in the system. It is a fixed size internal data type<br>
+ * provided for efficiency in addition to the API level cpu_set_t.<br>
+ *<br>
+ * @{<br>
+ */<br>
+<br>
+#define PROCESSOR_MASK_BITS_PER_FIELD 32<br>
+<br>
+#define PROCESSOR_MASK_FIELD_COUNT \<br>
+ ( ( CPU_MAXIMUM_PROCESSORS + PROCESSOR_MASK_BITS_PER_FIELD - 1 ) \<br>
+ / PROCESSOR_MASK_BITS_PER_FIELD )<br>
+<br>
+#define PROCESSOR_MASK_BIT( index ) \<br>
+ (1UL << ( ( index ) % PROCESSOR_MASK_BITS_PER_FIELD ) )<br>
+<br>
+#define PROCESSOR_MASK_FIELD( index ) \<br>
+ ( ( index ) / PROCESSOR_MASK_BITS_PER_FIELD )<br>
+<br>
+/**<br>
+ * @brief A bit map consisting of 32-bit integer fields which is large enough<br>
+ * to provide one bit for each processor in the system.<br>
+ *<br>
+ * Processor 0 corresponds to the bit 0 (least-significant) of the field 0 in<br>
+ * the array, and so on.<br>
+ */<br>
+typedef uint32_t Processor_mask[ PROCESSOR_MASK_FIELD_COUNT ];<br>
+<br>
+RTEMS_INLINE_ROUTINE void _Processor_mask_Set( Processor_mask mask, uint32_t index )<br>
+{<br>
+ mask[ PROCESSOR_MASK_FIELD( index ) ] |= PROCESSOR_MASK_BIT( index );<br>
+}<br>
+<br>
+RTEMS_INLINE_ROUTINE void _Processor_mask_Clear( Processor_mask mask, uint32_t index )<br>
+{<br>
+ mask[ PROCESSOR_MASK_FIELD( index ) ] &= ~PROCESSOR_MASK_BIT( index );<br>
+}<br>
+<br>
+RTEMS_INLINE_ROUTINE bool _Processor_mask_Is_set(<br>
+ const Processor_mask mask,<br>
+ uint32_t index<br>
+)<br>
+{<br>
+ return ( mask[ PROCESSOR_MASK_FIELD( index ) ]<br>
+ & PROCESSOR_MASK_BIT( index ) ) != 0;<br>
+}<br>
+<br>
+/** @} */<br>
+<br>
+#ifdef __cplusplus<br>
+}<br>
+#endif /* __cplusplus */<br>
+<br>
+#endif /* _RTEMS_SCORE_PROCESSORMASK_H */<br>
diff --git a/cpukit/score/<a href="http://preinstall.am" rel="noreferrer" target="_blank">preinstall.am</a> b/cpukit/score/<a href="http://preinstall.am" rel="noreferrer" target="_blank">preinstall.am</a><br>
index 0d9cade..3a70bfa 100644<br>
--- a/cpukit/score/<a href="http://preinstall.am" rel="noreferrer" target="_blank">preinstall.am</a><br>
+++ b/cpukit/score/<a href="http://preinstall.am" rel="noreferrer" target="_blank">preinstall.am</a><br>
@@ -212,6 +212,10 @@ $(PROJECT_INCLUDE)/rtems/score/profiling.h: include/rtems/score/profiling.h $(PR<br>
$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/rtems/score/profiling.h<br>
PREINSTALL_FILES += $(PROJECT_INCLUDE)/rtems/score/profiling.h<br>
<br>
+$(PROJECT_INCLUDE)/rtems/score/processormask.h: include/rtems/score/processormask.h $(PROJECT_INCLUDE)/rtems/score/$(dirstamp)<br>
+ $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/rtems/score/processormask.h<br>
+PREINSTALL_FILES += $(PROJECT_INCLUDE)/rtems/score/processormask.h<br>
+<br>
$(PROJECT_INCLUDE)/rtems/score/rbtree.h: include/rtems/score/rbtree.h $(PROJECT_INCLUDE)/rtems/score/$(dirstamp)<br>
$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/rtems/score/rbtree.h<br>
PREINSTALL_FILES += $(PROJECT_INCLUDE)/rtems/score/rbtree.h<br>
<span class="HOEnZb"><font color="#888888">--<br>
1.8.4.5<br>
<br>
_______________________________________________<br>
devel mailing list<br>
<a href="mailto:devel@rtems.org">devel@rtems.org</a><br>
<a href="http://lists.rtems.org/mailman/listinfo/devel" rel="noreferrer" target="_blank">http://lists.rtems.org/mailman/listinfo/devel</a><br>
</font></span></blockquote></div><br></div>