summaryrefslogtreecommitdiffstats
path: root/testsuites
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2017-10-10 07:13:37 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2017-10-10 07:17:51 +0200
commit4f9ed26655c2659fcf697a281cb401aa919849bf (patch)
treeb73d6b1fae44a8101e0c46f88a8729c074d6d5f4 /testsuites
parentposix: Simplify pthread_attr_setstack() (diff)
downloadrtems-4f9ed26655c2659fcf697a281cb401aa919849bf.tar.bz2
posix: Constify default thread processor affinity
Set default thread processor affinity to all processors of the pre-allocated set. This allows to constify the _POSIX_Threads_Default_attributes. Update #2514.
Diffstat (limited to 'testsuites')
-rw-r--r--testsuites/psxtests/psxgetattrnp01/init.c7
-rw-r--r--testsuites/psxtests/psxgetattrnp01/psxgetattrnp01.scn1
2 files changed, 8 insertions, 0 deletions
diff --git a/testsuites/psxtests/psxgetattrnp01/init.c b/testsuites/psxtests/psxgetattrnp01/init.c
index 2b7d699abd..afde4a210e 100644
--- a/testsuites/psxtests/psxgetattrnp01/init.c
+++ b/testsuites/psxtests/psxgetattrnp01/init.c
@@ -190,6 +190,7 @@ void *POSIX_Init(
size_t stacksize;
size_t guardsize;
struct sched_param param;
+ cpu_set_t set;
TEST_BEGIN();
@@ -211,6 +212,12 @@ void *POSIX_Init(
sc = pthread_attr_init(&Thread_attr);
rtems_test_assert(!sc);
+ puts("Init - pthread_attr_setaffinity_np");
+ CPU_ZERO( &set );
+ CPU_SET( 0, &set );
+ sc = pthread_attr_setaffinity_np( &Thread_attr, sizeof( set ), &set );
+ rtems_test_assert(!sc);
+
puts("Init - pthread_attr_setinheritsched - PTHREAD_EXPLICIT_SCHED");
sc = pthread_attr_setinheritsched( &Thread_attr, PTHREAD_EXPLICIT_SCHED );
rtems_test_assert(!sc);
diff --git a/testsuites/psxtests/psxgetattrnp01/psxgetattrnp01.scn b/testsuites/psxtests/psxgetattrnp01/psxgetattrnp01.scn
index ab09630f75..0ca49a5e81 100644
--- a/testsuites/psxtests/psxgetattrnp01/psxgetattrnp01.scn
+++ b/testsuites/psxtests/psxgetattrnp01/psxgetattrnp01.scn
@@ -2,6 +2,7 @@
Init - pthread_getattr_np - attr NULL - EINVAL
Init - pthread_getattr_np - invalid id - ESRCH
Init - pthread_attr_init
+Init - pthread_attr_setaffinity_np
Init - pthread_attr_setinheritsched - PTHREAD_EXPLICIT_SCHED
Init - pthread_attr_setschedpolicy to SCHED_RR
Init - pthread_attr_setschedparam to minimum priority + 2