summaryrefslogtreecommitdiffstats
path: root/cpukit/include/rtems/score/interr.h
diff options
context:
space:
mode:
Diffstat (limited to 'cpukit/include/rtems/score/interr.h')
-rw-r--r--cpukit/include/rtems/score/interr.h59
1 files changed, 36 insertions, 23 deletions
diff --git a/cpukit/include/rtems/score/interr.h b/cpukit/include/rtems/score/interr.h
index 33e9524b65..003e80e0bd 100644
--- a/cpukit/include/rtems/score/interr.h
+++ b/cpukit/include/rtems/score/interr.h
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/**
* @file
*
@@ -11,9 +13,26 @@
* COPYRIGHT (c) 1989-2009.
* 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_INTERR_H
@@ -144,12 +163,19 @@ typedef enum {
RTEMS_FATAL_SOURCE_HEAP = 13,
/**
+ * @brief Fatal source for spurious interrupts.
+ *
+ * The fatal code is the interrupt vector number of the spurious interrupt.
+ */
+ RTEMS_FATAL_SOURCE_SPURIOUS_INTERRUPT = 14,
+
+ /**
* @brief The last available fatal source.
*
* This enum value ensures that the enum type needs at least 32-bits for
* architectures with short enums.
*/
- RTEMS_FATAL_SOURCE_LAST = 0xffffffff
+ RTEMS_FATAL_SOURCE_LAST = 0x7fffffff
} Internal_errors_Source;
/**
@@ -181,8 +207,8 @@ typedef enum {
/* INTERNAL_ERROR_THREAD_QUEUE_ENQUEUE_FROM_BAD_STATE = 18, */
/* INTERNAL_ERROR_UNLIMITED_AND_MAXIMUM_IS_0 = 19, */
/* INTERNAL_ERROR_SHUTDOWN_WHEN_NOT_UP = 20, */
- INTERNAL_ERROR_GXX_KEY_ADD_FAILED = 21,
- INTERNAL_ERROR_GXX_MUTEX_INIT_FAILED = 22,
+ /* INTERNAL_ERROR_GXX_KEY_ADD_FAILED = 21, */
+ /* INTERNAL_ERROR_GXX_MUTEX_INIT_FAILED = 22, */
INTERNAL_ERROR_NO_MEMORY_FOR_HEAP = 23,
INTERNAL_ERROR_CPU_ISR_INSTALL_VECTOR = 24,
INTERNAL_ERROR_RESOURCE_IN_USE = 25,
@@ -203,26 +229,14 @@ typedef enum {
INTERNAL_ERROR_NO_MEMORY_FOR_PER_CPU_DATA = 40,
INTERNAL_ERROR_TOO_LARGE_TLS_SIZE = 41,
INTERNAL_ERROR_RTEMS_INIT_TASK_CONSTRUCT_FAILED = 42,
+ INTERNAL_ERROR_IDLE_THREAD_CREATE_FAILED = 43,
+ INTERNAL_ERROR_NO_MEMORY_FOR_IDLE_TASK_STORAGE = 44,
+ INTERNAL_ERROR_IDLE_THREAD_STACK_TOO_SMALL = 45
} Internal_errors_Core_list;
typedef CPU_Uint32ptr Internal_errors_t;
/**
- * This type holds the fatal error information.
- */
-typedef struct {
- /** This is the source of the error. */
- Internal_errors_Source the_source;
- /** This is the error code. */
- Internal_errors_t the_error;
-} Internal_errors_Information;
-
-/**
- * When a fatal error occurs, the error information is stored here.
- */
-extern Internal_errors_Information _Internal_errors_What_happened;
-
-/**
* @brief Initiates system termination.
*
* This routine is invoked when the application or the executive itself
@@ -246,8 +260,7 @@ extern Internal_errors_Information _Internal_errors_What_happened;
* may install an initial extension that performs a system reset. In this case
* the non-initial extensions will be not called.
*
- * Once all fatal handler executed the error information will be stored to
- * _Internal_errors_What_happened and the system state is set to
+ * Once all fatal handler executed the system state is set to
* SYSTEM_STATE_TERMINATED.
*
* The final step is to call the CPU specific _CPU_Fatal_halt().