Changeset 1c5d8f49 in rtems


Ignore:
Timestamp:
Jul 16, 2009, 2:57:36 PM (10 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.10, 4.11, master
Children:
13a4c71c
Parents:
ae596673
Message:

2009-07-16 Joel Sherrill <joel.sherrill@…>

  • spfatal03/spfatal03.scn, spfatal03/testcase.h: Fix spfatal03 to do what it was intended to do.
Location:
testsuites/sptests
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • testsuites/sptests/ChangeLog

    rae596673 r1c5d8f49  
     12009-07-16      Joel Sherrill <joel.sherrill@oarcorp.com>
     2
     3        * spfatal03/spfatal03.scn, spfatal03/testcase.h: Fix spfatal03 to do
     4        what it was intended to do.
     5
    162009-07-10      Joel Sherrill <joel.sherrill@OARcorp.com>
    27
  • testsuites/sptests/spfatal03/spfatal03.scn

    rae596673 r1c5d8f49  
    1 Create S0
    2 Fatal error (Core Mutex obtain in critical section) hit
     1Create semaphore S0
     2Obtain semaphore in dispatching critical section
  • testsuites/sptests/spfatal03/testcase.h

    rae596673 r1c5d8f49  
    11/*
    2  *  Classic API Init task create failure
     2 *  Semaphore Obtain in Critical Section
    33 *
    44 *  COPYRIGHT (c) 1989-2009.
     
    1212 */
    1313
    14 /*
    15  *  Way too much stack space.  Should generate a fatal error
    16  *  on the init task create.
    17  */
    18 #define CONFIGURE_HAS_OWN_INIT_TASK_TABLE
    19 #define CONFIGURE_INIT_TASK_STACK_SIZE            RTEMS_MINIMUM_STACK_SIZE
    20 rtems_initialization_tasks_table Initialization_tasks[] = {
    21   { rtems_build_name('I', 'N', 'I', ' '),
    22     RTEMS_MINIMUM_STACK_SIZE,
    23     1,
    24     RTEMS_DEFAULT_ATTRIBUTES,
    25     Init,
    26     RTEMS_DEFAULT_MODES,
    27     0
    28   }
    29 };
    30 #define CONFIGURE_INIT_TASK_TABLE Initialization_tasks
    31 #define CONFIGURE_INIT_TASK_TABLE_SIZE \
    32   sizeof(CONFIGURE_INIT_TASK_TABLE) / sizeof(rtems_initialization_tasks_table)
     14#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
    3315
    3416#define CONFIGURE_MAXIMUM_SEMAPHORES 10
     
    3921#define FATAL_ERROR_EXPECTED_ERROR       INTERNAL_ERROR_MUTEX_OBTAIN_FROM_BAD_STATE
    4022
    41 rtems_id   Mutex_id[1];
    42 rtems_name Mutex_name[1];
    43 
    4423void force_error(void)
    4524{
     25
    4626  rtems_status_code status;
     27   rtems_id    mutex;
    4728
    48   Mutex_name[0] = rtems_build_name( 'S','0',' ',' ');
    4929  status = rtems_semaphore_create(
    50     Mutex_name[0],
     30    rtems_build_name( 'S','0',' ',' '),
    5131    1,
    5232    RTEMS_LOCAL|
    53     RTEMS_SIMPLE_BINARY_SEMAPHORE|
    54     RTEMS_PRIORITY_CEILING |
    55     RTEMS_PRIORITY,
     33    RTEMS_SIMPLE_BINARY_SEMAPHORE,
    5634    0,
    57     &Mutex_id[0]
     35    &mutex
    5836  );
    5937  directive_failed( status, "rtems_semaphore_create of S0");
    60   printf("Create S0\n");
     38  puts("Create semaphore S0");
    6139
    62 
     40  puts("Obtain semaphore in dispatching critical section");
    6341  _Thread_Disable_dispatch();
    64   status = rtems_semaphore_obtain( Mutex_id[0], RTEMS_DEFAULT_OPTIONS, 0 );
     42  status = rtems_semaphore_obtain( mutex, RTEMS_DEFAULT_OPTIONS, 0 );
    6543  /* !!! SHOULD NOT RETURN FROM THE ABOVE CALL */
    6644
    6745  _Thread_Enable_dispatch();
    68   directive_failed( status, "rtems_semaphore_obtain" );
     46  puts("ERROR -- Obtain semaphore should not have returned");
    6947 
    7048  /* we will not run this far */
Note: See TracChangeset for help on using the changeset viewer.