[rtems commit] sptests/spthreadq01: Add SMP support

Sebastian Huber sebh at rtems.org
Tue Aug 27 08:44:49 UTC 2013


Module:    rtems
Branch:    master
Commit:    ff0dcf2c4514025f113ed0db9d31c7bcdafcadb1
Changeset: http://git.rtems.org/rtems/commit/?id=ff0dcf2c4514025f113ed0db9d31c7bcdafcadb1

Author:    Sebastian Huber <sebastian.huber at embedded-brains.de>
Date:      Mon Aug 26 16:51:30 2013 +0200

sptests/spthreadq01: Add SMP support

---

 testsuites/sptests/spthreadq01/init.c |    8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/testsuites/sptests/spthreadq01/init.c b/testsuites/sptests/spthreadq01/init.c
index 9924b18..3b6d2fc 100644
--- a/testsuites/sptests/spthreadq01/init.c
+++ b/testsuites/sptests/spthreadq01/init.c
@@ -29,13 +29,17 @@ void threadq_first_empty(
 )
 {
   Thread_queue_Control tq;
+  bool we_did_it;
 
   printf( "Init - initialize thread queue for %s\n", discipline_string );
   _Thread_queue_Initialize( &tq, discipline, 0x01, 3 );
 
   puts( "Init - _Thread_queue_Extract - thread not blocked on a thread queue" );
-  _Thread_queue_Extract( &tq, _Thread_Get_executing() );
-  /* is there anything to check? */
+  _Thread_Disable_dispatch();
+  we_did_it = _Thread_queue_Extract( &tq, _Thread_Executing );
+  _Thread_Enable_dispatch();
+  rtems_test_assert( !we_did_it );
+  /* is there more to check? */
 }
 
 rtems_task Init(




More information about the vc mailing list