summaryrefslogtreecommitdiffstats
path: root/cpukit/posix
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2016-06-14 17:21:53 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2016-06-22 14:00:28 +0200
commit4dc5450eebc1d863ea31f4b5e00fb7a9b67972e8 (patch)
treea2f4c401f9d5ecbc6bbbf858e7d04c0692100fea /cpukit/posix
parentposix: Delete POSIX_API_Control::ss_high_priority (diff)
downloadrtems-4dc5450eebc1d863ea31f4b5e00fb7a9b67972e8.tar.bz2
posix: Delete POSIX_API_Control::schedpolicy
This field was redundant.
Diffstat (limited to 'cpukit/posix')
-rw-r--r--cpukit/posix/include/rtems/posix/threadsup.h2
-rw-r--r--cpukit/posix/src/pthread.c3
-rw-r--r--cpukit/posix/src/pthreadcreate.c3
-rw-r--r--cpukit/posix/src/pthreadgetschedparam.c2
-rw-r--r--cpukit/posix/src/pthreadsetschedparam.c3
5 files changed, 4 insertions, 9 deletions
diff --git a/cpukit/posix/include/rtems/posix/threadsup.h b/cpukit/posix/include/rtems/posix/threadsup.h
index 60bf0e46da..a9f36ef1ad 100644
--- a/cpukit/posix/include/rtems/posix/threadsup.h
+++ b/cpukit/posix/include/rtems/posix/threadsup.h
@@ -47,8 +47,6 @@ typedef struct {
Thread_Control *thread;
/** This is the POSIX threads attribute set. */
pthread_attr_t Attributes;
- /** This is the thread's current scheduling policy. */
- int schedpolicy;
/** This is the thread's current set of scheduling parameters. */
struct sched_param schedparam;
/**
diff --git a/cpukit/posix/src/pthread.c b/cpukit/posix/src/pthread.c
index 432f70cf1b..33c2830aef 100644
--- a/cpukit/posix/src/pthread.c
+++ b/cpukit/posix/src/pthread.c
@@ -193,7 +193,6 @@ static bool _POSIX_Threads_Create_extension(
/* XXX check all fields are touched */
api->thread = created;
_POSIX_Threads_Initialize_attributes( &api->Attributes );
- api->schedpolicy = _POSIX_Threads_Default_attributes.schedpolicy;
api->schedparam = _POSIX_Threads_Default_attributes.schedparam;
api->schedparam.sched_priority =
_POSIX_Priority_From_core( created->current_priority );
@@ -232,7 +231,7 @@ static void _POSIX_Threads_Terminate_extension( Thread_Control *executing )
_Thread_State_acquire( executing, &lock_context );
- if ( api->schedpolicy == SCHED_SPORADIC ) {
+ if ( api->Attributes.schedpolicy == SCHED_SPORADIC ) {
_Watchdog_Per_CPU_remove_relative( &api->Sporadic_timer );
}
diff --git a/cpukit/posix/src/pthreadcreate.c b/cpukit/posix/src/pthreadcreate.c
index a120fdda8d..019ccc86a8 100644
--- a/cpukit/posix/src/pthreadcreate.c
+++ b/cpukit/posix/src/pthreadcreate.c
@@ -110,7 +110,7 @@ int pthread_create(
switch ( the_attr->inheritsched ) {
case PTHREAD_INHERIT_SCHED:
api = executing->API_Extensions[ THREAD_API_POSIX ];
- schedpolicy = api->schedpolicy;
+ schedpolicy = api->Attributes.schedpolicy;
schedparam = api->schedparam;
break;
@@ -226,7 +226,6 @@ int pthread_create(
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
_POSIX_Threads_Copy_attributes( &api->Attributes, the_attr );
- api->schedpolicy = schedpolicy;
api->schedparam = schedparam;
if ( schedpolicy == SCHED_SPORADIC ) {
diff --git a/cpukit/posix/src/pthreadgetschedparam.c b/cpukit/posix/src/pthreadgetschedparam.c
index 9b6969ce8e..d03a8a8113 100644
--- a/cpukit/posix/src/pthreadgetschedparam.c
+++ b/cpukit/posix/src/pthreadgetschedparam.c
@@ -51,7 +51,7 @@ int pthread_getschedparam(
_Thread_State_acquire_critical( the_thread, &lock_context );
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
- *policy = api->schedpolicy;
+ *policy = api->Attributes.schedpolicy;
*param = api->schedparam;
param->sched_priority = _POSIX_Priority_From_core(
the_thread->real_priority
diff --git a/cpukit/posix/src/pthreadsetschedparam.c b/cpukit/posix/src/pthreadsetschedparam.c
index 55019dd690..30ddd0347c 100644
--- a/cpukit/posix/src/pthreadsetschedparam.c
+++ b/cpukit/posix/src/pthreadsetschedparam.c
@@ -80,11 +80,10 @@ int pthread_setschedparam(
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
- if ( api->schedpolicy == SCHED_SPORADIC ) {
+ if ( api->Attributes.schedpolicy == SCHED_SPORADIC ) {
_Watchdog_Per_CPU_remove_relative( &api->Sporadic_timer );
}
- api->schedpolicy = policy;
api->schedparam = *param;
api->Attributes.schedpolicy = policy;
api->Attributes.schedparam = *param;