mirror of
https://gitlab.rtems.org/rtems/rtos/rtems.git
synced 2026-09-21 13:17:45 +08:00
psxsignal06: Fix bug where mutex not locked and add EPERM error check
This test formerly had a bug in that it attempted to wait on a
condition variable with a Mutex that was not locked. This is
undefined by POSIX. But a recent change to match GNU/Linux behavior
resulted in finding a bug in the test.
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* COPYRIGHT (c) 1989-2012.
|
||||
* COPYRIGHT (c) 1989-2013.
|
||||
* On-Line Applications Research Corporation (OAR).
|
||||
*
|
||||
* The license and distribution terms for this file may be
|
||||
@@ -56,6 +56,9 @@ void *TestThread(
|
||||
act.sa_flags = 0;
|
||||
sigaction( SIGUSR1, &act, NULL );
|
||||
|
||||
status = pthread_mutex_lock( &MutexId );
|
||||
rtems_test_assert( !status );
|
||||
|
||||
/* interrupting condition wait returns 0 */
|
||||
puts( "Test: pthread_cond_wait - OK" );
|
||||
status = pthread_cond_wait( &CondVarId, &MutexId );
|
||||
|
||||
Reference in New Issue
Block a user