summaryrefslogtreecommitdiffstats
path: root/cpukit/include/rtems/score/smpimpl.h
diff options
context:
space:
mode:
Diffstat (limited to 'cpukit/include/rtems/score/smpimpl.h')
-rw-r--r--cpukit/include/rtems/score/smpimpl.h50
1 files changed, 32 insertions, 18 deletions
diff --git a/cpukit/include/rtems/score/smpimpl.h b/cpukit/include/rtems/score/smpimpl.h
index 7c3e777299..a8e3a3be15 100644
--- a/cpukit/include/rtems/score/smpimpl.h
+++ b/cpukit/include/rtems/score/smpimpl.h
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/**
* @file
*
@@ -11,9 +13,26 @@
* COPYRIGHT (c) 1989-2011.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 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.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS 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 COPYRIGHT OWNER 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) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT 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.
*/
#ifndef _RTEMS_SCORE_SMPIMPL_H
@@ -21,7 +40,7 @@
#include <rtems/score/smp.h>
#include <rtems/score/percpu.h>
-#include <rtems/score/processormask.h>
+#include <rtems/score/processormaskimpl.h>
#include <rtems/fatal.h>
#ifdef __cplusplus
@@ -72,7 +91,9 @@ typedef enum {
SMP_FATAL_SHUTDOWN_RESPONSE,
SMP_FATAL_START_OF_MANDATORY_PROCESSOR_FAILED,
SMP_FATAL_SCHEDULER_PIN_OR_UNPIN_NOT_SUPPORTED,
- SMP_FATAL_WRONG_CPU_STATE_TO_PERFORM_JOBS
+ SMP_FATAL_WRONG_CPU_STATE_TO_PERFORM_JOBS,
+ SMP_FATAL_SCHEDULER_REQUIRES_EXACTLY_ONE_PROCESSOR,
+ SMP_FATAL_MULTITASKING_START_ON_NOT_ONLINE_PROCESSOR
} SMP_Fatal_code;
/**
@@ -145,12 +166,9 @@ RTEMS_NO_RETURN void _SMP_Start_multitasking_on_secondary_processor(
* @param[in, out] cpu_self is the processor control of the processor executing
* this function.
*
- * @return Returns the processed message.
+ * @param message is the message to process.
*/
-long unsigned _SMP_Process_message(
- Per_CPU_Control *cpu_self,
- long unsigned message
-);
+void _SMP_Process_message( Per_CPU_Control *cpu_self, long unsigned message );
/**
* @brief Tries to process the current SMP message.
@@ -179,10 +197,8 @@ void _SMP_Try_to_process_message(
*
* @param[in, out] cpu_self is the processor control of the processor executing
* this function.
- *
- * @return Returns the processed message.
*/
-static inline long unsigned _SMP_Inter_processor_interrupt_handler(
+static inline void _SMP_Inter_processor_interrupt_handler(
Per_CPU_Control *cpu_self
)
{
@@ -201,10 +217,8 @@ static inline long unsigned _SMP_Inter_processor_interrupt_handler(
);
if ( RTEMS_PREDICT_FALSE( message != 0 ) ) {
- return _SMP_Process_message( cpu_self, message );
+ _SMP_Process_message( cpu_self, message );
}
-
- return message;
}
/**
@@ -334,7 +348,7 @@ void _SMP_Synchronize( void );
*
* @return The processor mask with all online processors.
*/
-RTEMS_INLINE_ROUTINE const Processor_mask *_SMP_Get_online_processors( void )
+static inline const Processor_mask *_SMP_Get_online_processors( void )
{
#if defined(RTEMS_SMP)
return &_SMP_Online_processors;
@@ -349,7 +363,7 @@ RTEMS_INLINE_ROUTINE const Processor_mask *_SMP_Get_online_processors( void )
* @return True if inter-processor interrupts are needed for the correct system
* operation, otherwise false.
*/
-RTEMS_INLINE_ROUTINE bool _SMP_Need_inter_processor_interrupts( void )
+static inline bool _SMP_Need_inter_processor_interrupts( void )
{
/*
* Use the configured processor maximum instead of the actual to allow