Changeset 712726d in rtems for testsuites/psxtests/psx07/task.c


Ignore:
Timestamp:
Aug 19, 2009, 2:55:24 PM (10 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.10, 4.11, master
Children:
4e7ca87
Parents:
3a121776
Message:

2009-08-19 Joel Sherrill <joel.sherrill@…>

  • psx07/init.c, psx07/psx07.scn, psx07/system.h, psx07/task.c: Update test to reflect not allowing poriority changes when mutex is locked.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • testsuites/psxtests/psx07/task.c

    r3a121776 r712726d  
    3232  return NULL; /* just so the compiler thinks we returned something */
    3333}
     34
     35void *Task_2(
     36  void *argument
     37)
     38{
     39  int i = 0;
     40  time_t now, start;
     41
     42  /*
     43   *  Change our priority so we are running at a logically higher
     44   *  priority than our "ss_high_priority".  This should result in
     45   *  our replenishment period not touching our priority.
     46   */
     47
     48  /*
     49   *  Consume time so the cpu budget callout will run. 
     50   *
     51   *  DO NOT BLOCK!!!
     52   */
     53  start = time(&start);
     54  while( i <= 10 ) {
     55    do {
     56      now = time(&now);
     57    } while (start == now);
     58    start = time(&start);
     59   
     60    printf( "Time elapsed Task_2: %2d (seconds)\n", i++ );
     61  }
     62
     63  puts( "Task_2 - exitting" );
     64  pthread_exit( NULL );
     65  return NULL;
     66}
Note: See TracChangeset for help on using the changeset viewer.