Changeset 7950309 in rtems


Ignore:
Timestamp:
Aug 2, 1995, 7:56:51 PM (25 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.10, 4.11, 4.8, 4.9, 5, master
Children:
0d55427
Parents:
4f90134
Message:

Added test cases:

+ some from Andy Bray (andy@…) which do not include

task start up cost.

+ cases for interrupt disable, enable, and flash

Files:
2 edited

Legend:

Unmodified
Added
Removed
  • c/src/tests/tmtests/tm26/task1.c

    r4f90134 r7950309  
    99 *  notice must appear in all copies of this file and its derivatives.
    1010 *
    11  *  $Id$
     11 *  task1.c,v 1.3 1995/06/05 23:55:00 joel Exp
    1212 */
    1313
     
    3232
    3333Thread_Control *Middle_tcb;   /* uses internal RTEMS type */
     34
     35Thread_Control *Low_tcb;      /* uses internal RTEMS type */
    3436
    3537rtems_task High_task(
     
    167169)
    168170{
     171  rtems_interrupt_level level;
     172
     173  Timer_initialize();
     174    rtems_interrupt_disable( level );
     175  end_time = Read_timer();
     176 
     177  put_time(
     178    "INTERRUPT DISABLE",
     179    end_time,
     180    1,
     181    0,
     182    0
     183  );
     184
     185  Timer_initialize();
     186    rtems_interrupt_flash( level );
     187  end_time = Read_timer();
     188 
     189  put_time(
     190    "INTERRUPT FLASH",
     191    end_time,
     192    1,
     193    0,
     194    0
     195  );
     196 
     197  Timer_initialize();
     198    rtems_interrupt_enable( level );
     199  end_time = Read_timer();
     200 
     201  put_time(
     202    "INTERRUPT ENABLE",
     203    end_time,
     204    1,
     205    0,
     206    0
     207  );
     208 
    169209  Timer_initialize();
    170210    _Thread_Disable_dispatch();
     
    178218    0
    179219  );
    180 
    181220
    182221  Timer_initialize();
     
    239278  Timer_initialize();
    240279    _Context_Switch( &Middle_tcb->Registers, &_Thread_Executing->Registers );
     280
     281  Timer_initialize();
     282    _Context_Switch(&Middle_tcb->Registers, &Low_tcb->Registers);
    241283}
    242284
     
    258300
    259301  executing    = _Thread_Executing;
     302
     303  Low_tcb = executing;
     304
     305  Timer_initialize();
     306    _Context_Switch( &executing->Registers, &executing->Registers );
     307
     308  end_time = Read_timer();
     309
     310  put_time(
     311    "CONTEXT_SWITCH (SELF)",
     312    end_time,
     313    1,
     314    0,
     315    0
     316  );
     317
     318  _Context_Switch(&executing->Registers, &Middle_tcb->Registers);
     319
     320  end_time = Read_timer();
     321
     322  put_time(
     323    "CONTEXT_SWITCH (Initialised)",
     324    end_time,
     325    1,
     326    0,
     327    0
     328  );
    260329
    261330  _Thread_Executing =
  • testsuites/tmtests/tm26/task1.c

    r4f90134 r7950309  
    99 *  notice must appear in all copies of this file and its derivatives.
    1010 *
    11  *  $Id$
     11 *  task1.c,v 1.3 1995/06/05 23:55:00 joel Exp
    1212 */
    1313
     
    3232
    3333Thread_Control *Middle_tcb;   /* uses internal RTEMS type */
     34
     35Thread_Control *Low_tcb;      /* uses internal RTEMS type */
    3436
    3537rtems_task High_task(
     
    167169)
    168170{
     171  rtems_interrupt_level level;
     172
     173  Timer_initialize();
     174    rtems_interrupt_disable( level );
     175  end_time = Read_timer();
     176 
     177  put_time(
     178    "INTERRUPT DISABLE",
     179    end_time,
     180    1,
     181    0,
     182    0
     183  );
     184
     185  Timer_initialize();
     186    rtems_interrupt_flash( level );
     187  end_time = Read_timer();
     188 
     189  put_time(
     190    "INTERRUPT FLASH",
     191    end_time,
     192    1,
     193    0,
     194    0
     195  );
     196 
     197  Timer_initialize();
     198    rtems_interrupt_enable( level );
     199  end_time = Read_timer();
     200 
     201  put_time(
     202    "INTERRUPT ENABLE",
     203    end_time,
     204    1,
     205    0,
     206    0
     207  );
     208 
    169209  Timer_initialize();
    170210    _Thread_Disable_dispatch();
     
    178218    0
    179219  );
    180 
    181220
    182221  Timer_initialize();
     
    239278  Timer_initialize();
    240279    _Context_Switch( &Middle_tcb->Registers, &_Thread_Executing->Registers );
     280
     281  Timer_initialize();
     282    _Context_Switch(&Middle_tcb->Registers, &Low_tcb->Registers);
    241283}
    242284
     
    258300
    259301  executing    = _Thread_Executing;
     302
     303  Low_tcb = executing;
     304
     305  Timer_initialize();
     306    _Context_Switch( &executing->Registers, &executing->Registers );
     307
     308  end_time = Read_timer();
     309
     310  put_time(
     311    "CONTEXT_SWITCH (SELF)",
     312    end_time,
     313    1,
     314    0,
     315    0
     316  );
     317
     318  _Context_Switch(&executing->Registers, &Middle_tcb->Registers);
     319
     320  end_time = Read_timer();
     321
     322  put_time(
     323    "CONTEXT_SWITCH (Initialised)",
     324    end_time,
     325    1,
     326    0,
     327    0
     328  );
    260329
    261330  _Thread_Executing =
Note: See TracChangeset for help on using the changeset viewer.