Changeset 9460b7e in rtems-testing


Ignore:
Timestamp:
Jul 20, 2011, 9:29:00 PM (8 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.11, 8895273c193787f84c4585a10f6d6aceb3b25dc4
Children:
453b502
Parents:
24acc03
Message:

2011-07-20 Joel Sherrill <joel.sherrill@…>

  • psxtmtest_unblocking_nopreempt/init.c: Fix pattern.
Location:
rtems-test-template
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • rtems-test-template/ChangeLog

    r24acc03 r9460b7e  
     12011-07-20      Joel Sherrill <joel.sherrill@oarcorp.com>
     2
     3        * psxtmtest_unblocking_nopreempt/init.c: Fix pattern.
     4
    152011-07-20      Joel Sherrill <joel.sherrill@oarcorp.com>
    26
  • rtems-test-template/psxtmtest_unblocking_nopreempt/init.c

    r24acc03 r9460b7e  
    2424pthread_mutex_t MutexId;
    2525
    26 void *Blockers(
     26void *Blocker(
    2727  void *argument
    2828)
    2929{
    30   int status;
    31 
    32   /*
    33    * Now we have finished the thread startup overhead,
    34    * so let other threads run.  When we return, we can
    35    * finish the benchmark.
    36    */
    37   sched_yield();
    38     /* let other threads run */
    39 
    40   status = pthread_mutex_lock( &MutexId );
    41   rtems_test_assert( status == 0 );
     30  (void) /* XXX blocking operation goes here */
     31  /* should never return */
     32  rtems_test_assert( FALSE );
    4233
    4334  return NULL;
     
    4839)
    4940{
    50   int        i;
    5141  int        status;
    5242  pthread_t  threadId;
    5343  long       end_time;
    5444
    55   puts( "\n\n*** POSIX TIME TEST MUTEX @TESTNUM@ ***" );
     45  puts( "\n\n*** POSIX TIME TEST XXX @TESTNUM@ ***" );
    5646
    57   for ( i=0 ; i < OPERATION_COUNT ; i++ ) {
    58     status = pthread_create( &threadId, NULL, Blockers, NULL );
    59     rtems_test_assert( status == 0 );
    60   }
     47  status = pthread_create( &threadId, NULL, Blocker, NULL );
     48  rtems_test_assert( status == 0 );
    6149 
    6250  /*
     
    6452   * threads do run before we intend, they will get an error.
    6553   */
    66   status = 0; /* XXX create the resource */
     54  status = 0; /* XXX create resource */
    6755  rtems_test_assert( status == 0 );
    6856
     
    7058   * Ensure the mutex is unavailable so the other threads block.
    7159   */
    72   status = 0; /* XXX ensure the resource is unavailable so the threads block */
     60  status = 0; /* XXX lock resource to ensure thread blocks */
    7361  rtems_test_assert( status == 0 );
    7462
    7563  /*
    76    * Let the other threads start so the thread startup overhead,
     64   * Let the other thread start so the thread startup overhead,
    7765   * is accounted for.  When we return, we can start the benchmark.
    7866   */
    7967  sched_yield();
    80     /* let other threads run */
     68    /* let other thread run */
    8169
    8270  benchmark_timer_initialize();
    83     status = 0; /* XXX release the resource */
     71    status = 0; /* XXX unblocking operation goes here */
    8472  end_time = benchmark_timer_read();
    8573  rtems_test_assert( status == 0 );
    8674
    8775  put_time(
    88     "@DESC@",
     76    "@DESC",
    8977    end_time,
    90     OPERATION_COUNT,
     78    1,
    9179    0,
    9280    0
    9381  );
    9482
    95   puts( "*** END OF POSIX TIME TEST MUTEX @TESTNUM@ ***" );
     83  puts( "*** END OF POSIX TIME TEST XXX @TESTNUM@ ***" );
    9684  rtems_test_exit( 0 );
    9785
     
    10492#define CONFIGURE_APPLICATION_NEEDS_TIMER_DRIVER
    10593
    106 #define CONFIGURE_MAXIMUM_POSIX_THREADS     OPERATION_COUNT + 1
    107 /* XXX configure one of the resources */
     94#define CONFIGURE_MAXIMUM_POSIX_THREADS     2
     95/* XXX make sure you configure the resource */
    10896#define CONFIGURE_POSIX_INIT_THREAD_TABLE
    10997
Note: See TracChangeset for help on using the changeset viewer.