summaryrefslogtreecommitdiffstats
path: root/cpukit/score/src/schedulerpriorityallocate.c
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2013-08-08 08:45:33 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2013-08-20 10:14:02 +0200
commit0c551f76e5432941d535bf8cf4ed5b6809e5f13e (patch)
treeef1d5662a8d93911492c021a320995417daf183f /cpukit/score/src/schedulerpriorityallocate.c
parentscore: PR2136: Fix _Thread_Change_priority() (diff)
downloadrtems-0c551f76e5432941d535bf8cf4ed5b6809e5f13e.tar.bz2
score: Add _Scheduler_priority_Get_scheduler_info
Add and use _Scheduler_priority_Get_scheduler_info().
Diffstat (limited to 'cpukit/score/src/schedulerpriorityallocate.c')
-rw-r--r--cpukit/score/src/schedulerpriorityallocate.c14
1 files changed, 5 insertions, 9 deletions
diff --git a/cpukit/score/src/schedulerpriorityallocate.c b/cpukit/score/src/schedulerpriorityallocate.c
index 8c2291fa7a..ec0f21042d 100644
--- a/cpukit/score/src/schedulerpriorityallocate.c
+++ b/cpukit/score/src/schedulerpriorityallocate.c
@@ -18,21 +18,17 @@
#include "config.h"
#endif
-#include <rtems/system.h>
-#include <rtems/config.h>
-#include <rtems/score/scheduler.h>
#include <rtems/score/schedulerpriority.h>
#include <rtems/score/wkspace.h>
-void* _Scheduler_priority_Allocate (
+void *_Scheduler_priority_Allocate (
Thread_Control *the_thread
)
{
- void *sched;
+ Scheduler_priority_Per_thread *sched_info_of_thread =
+ _Workspace_Allocate( sizeof( *sched_info_of_thread ) );
- sched = _Workspace_Allocate( sizeof(Scheduler_priority_Per_thread) );
+ the_thread->scheduler_info = sched_info_of_thread;
- the_thread->scheduler_info = (Scheduler_priority_Per_thread*) sched;
-
- return sched;
+ return sched_info_of_thread;
}