Changeset f9ff8ce in rtems


Ignore:
Timestamp:
Jul 1, 2009, 4:15:21 PM (10 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.10, 4.11, master
Children:
e5d3dd6
Parents:
d852e234
Message:

2009-07-01 Santosh G Vattam <vattam.santosh@…>

  • psxrwlock01/psxrwlock01.scn, psxrwlock01/test.c: Add test case for obtaining rwlock for write with a timed lock operation when the abstime timeout is in the past.
Location:
testsuites/psxtests
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • testsuites/psxtests/ChangeLog

    rd852e234 rf9ff8ce  
     12009-07-01      Santosh G Vattam <vattam.santosh@gmail.com>
     2
     3        * psxrwlock01/psxrwlock01.scn, psxrwlock01/test.c: Add test case for
     4        obtaining rwlock for write with a timed lock operation when the
     5        abstime timeout is in the past.
     6
    172009-06-30      Joel Sherrill <joel.sherrill@OARcorp.com>
    28
  • testsuites/psxtests/psxrwlock01/psxrwlock01.scn

    rd852e234 rf9ff8ce  
    7676pthread_rwlock_timedrdlock( &RWLock, &abstime) -- ETIMEDOUT
    7777pthread_rwlock_timedrdlock( &RWLock, &abstime) -- ETIMEDOUT
     78pthread_rwlock_timedwrlock( &RWLock, &abstime) -- ETIMEDOUT
    7879pthread_rwlock_timedrdlock( &RWLock, &abstime) -- in past -- OK
     80pthread_rwlock_timedwrlock( &RWLock, &abstime) -- in past -- OK
    7981pthread_rwlock_destroy( &RWLock ) -- OK
    8082*** END OF POSIX RWLOCK TEST 01 ***
  • testsuites/psxtests/psxrwlock01/test.c

    rd852e234 rf9ff8ce  
    380380  assert( status == ETIMEDOUT );
    381381
     382  abstime.tv_sec -= 1;
     383  puts( "pthread_rwlock_timedwrlock( &RWLock, &abstime) -- ETIMEDOUT" );
     384  status = pthread_rwlock_timedwrlock( &RWLock, &abstime );
     385  assert( status == ETIMEDOUT );
     386
    382387  /*************** OBTAIN RWLOCK WITH ABSTIME IN PAST ***************/
    383388  status = pthread_rwlock_unlock(&RWLock);
     
    387392  puts( "pthread_rwlock_timedrdlock( &RWLock, &abstime) -- in past -- OK" );
    388393  status = pthread_rwlock_timedrdlock( &RWLock, &abstime );
     394  assert( status == 0 );
     395
     396  /*************** OBTAIN RWLOCK FOR WRITE WITH ABSTIME IN PAST ***************/
     397  status = pthread_rwlock_unlock(&RWLock);
     398  assert( !status );
     399
     400  abstime.tv_sec -= 1;
     401  puts( "pthread_rwlock_timedwrlock( &RWLock, &abstime) -- in past -- OK" );
     402  status = pthread_rwlock_timedwrlock( &RWLock, &abstime );
    389403  assert( status == 0 );
    390404
Note: See TracChangeset for help on using the changeset viewer.