[rtems commit] smppsxaffinity02: Fix thread attribute usage
Sebastian Huber
sebh at rtems.org
Thu Nov 2 10:25:52 UTC 2017
Module: rtems
Branch: master
Commit: 81fd79daf0a48f51c3ca29c953e029d645fd08fb
Changeset: http://git.rtems.org/rtems/commit/?id=81fd79daf0a48f51c3ca29c953e029d645fd08fb
Author: Sebastian Huber <sebastian.huber at embedded-brains.de>
Date: Fri Oct 27 08:52:41 2017 +0200
smppsxaffinity02: Fix thread attribute usage
The pthread_getattr_np() returns now the stack address and size. Do not
use this stack for the new threads.
Update #2514.
Update #3145.
Update #3168.
---
testsuites/smptests/smppsxaffinity02/init.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/testsuites/smptests/smppsxaffinity02/init.c b/testsuites/smptests/smppsxaffinity02/init.c
index 21a723d..2d6dc10 100644
--- a/testsuites/smptests/smppsxaffinity02/init.c
+++ b/testsuites/smptests/smppsxaffinity02/init.c
@@ -113,6 +113,10 @@ void Validate_affinity(void )
puts( "Init - Set Init priority to high");
sc = pthread_getattr_np( Init_id, &attr );
rtems_test_assert( sc == 0 );
+
+ sc = pthread_attr_setstack( &attr, NULL, 0 );
+ rtems_test_assert( sc == 0 );
+
sc = pthread_attr_getschedparam( &attr, ¶m );
rtems_test_assert( sc == 0 );
param.sched_priority = sched_get_priority_max( SCHED_FIFO );
More information about the vc
mailing list