source: rtems/testsuites/sptests/spfatal07/testcase.h @ a16af0b3

4.115
Last change on this file since a16af0b3 was c499856, checked in by Chris Johns <chrisj@…>, on 03/20/14 at 21:10:47

Change all references of rtems.com to rtems.org.

  • Property mode set to 100644
File size: 1.8 KB
RevLine 
[5fdb1e7b]1/*
2 * Classic API Init task create failure
3 *
[9e15e9b]4 *  COPYRIGHT (c) 1989-2011.
[bb9c80df]5 *  On-Line Applications Research Corporation (OAR).
6 *
7 *  The license and distribution terms for this file may be
8 *  found in the file LICENSE in this distribution or at
[c499856]9 *  http://www.rtems.org/license/LICENSE.
[5fdb1e7b]10 */
11
12/*
13 *  Way too much stack space.  Should generate a fatal error
14 *  on the init task create.
15 */
16#define CONFIGURE_HAS_OWN_INIT_TASK_TABLE
17#define CONFIGURE_INIT_TASK_STACK_SIZE   RTEMS_MINIMUM_STACK_SIZE
18rtems_initialization_tasks_table Initialization_tasks[] = {
19  { rtems_build_name('I', 'N', 'I', ' '),
20    RTEMS_MINIMUM_STACK_SIZE,
21    1,
22    RTEMS_DEFAULT_ATTRIBUTES,
23    Init,
24    RTEMS_DEFAULT_MODES,
25    0
26  }
27};
28#define CONFIGURE_INIT_TASK_TABLE Initialization_tasks
29#define CONFIGURE_INIT_TASK_TABLE_SIZE \
30  sizeof(CONFIGURE_INIT_TASK_TABLE) / sizeof(rtems_initialization_tasks_table)
31
[d329acf4]32#define FATAL_ERROR_TEST_NAME            "7"
33#define FATAL_ERROR_DESCRIPTION \
34        "Core Configuration Invalid ISR stack size"
[5fdb1e7b]35#define FATAL_ERROR_EXPECTED_SOURCE      INTERNAL_ERROR_CORE
36#define FATAL_ERROR_EXPECTED_IS_INTERNAL TRUE
[9e15e9b]37#define FATAL_ERROR_EXPECTED_ERROR       \
38          INTERNAL_ERROR_INTERRUPT_STACK_TOO_SMALL
[5fdb1e7b]39
[47a3cd8]40#if CPU_SIMPLE_VECTORED_INTERRUPTS == TRUE
41  #define CONFIGURE_MEMORY_OVERHEAD (sizeof(ISR_Handler_entry) * ISR_NUMBER_OF_VECTORS)
42#endif
43
[3dd120f0]44#if CPU_ALLOCATE_INTERRUPT_STACK == TRUE
45  #define CONFIGURE_INTERRUPT_STACK_SIZE (STACK_MINIMUM_SIZE - 1)
46#endif
47
[5fdb1e7b]48void force_error()
49{
[b1274bd9]50  #if (CPU_ALLOCATE_INTERRUPT_STACK == TRUE)
[3dd120f0]51    /* we will not run this far */
[d4f932c9]52  #else
[6091bc3a]53    printk(
[d4f932c9]54      "WARNING - Test not applicable on this target architecture.\n"
[6091bc3a]55      "WARNING - Only applicable when CPU_ALLOCATE_INTERRUPT_STACK == TRUE.\n"
[3c83d57a]56      "*** END OF TEST FATAL " FATAL_ERROR_TEST_NAME " ***\n"
[d4f932c9]57    );
58    rtems_test_exit(0);
59  #endif
[5fdb1e7b]60}
Note: See TracBrowser for help on using the repository browser.