diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2014-04-04 10:56:36 +0200 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2014-04-15 08:37:11 +0200 |
commit | e1598a616db1e9dadfd74abeb20b1f1ec5daaa7f (patch) | |
tree | 0aabc512f4beb2b30eba7885926d06a878988855 /cpukit/score/src/schedulercbsattachthread.c | |
parent | score: Add and use RTEMS_ZERO_LENGTH_ARRAY (diff) | |
download | rtems-e1598a616db1e9dadfd74abeb20b1f1ec5daaa7f.tar.bz2 |
score: Static scheduler configuration
Do not allocate the scheduler control structures from the workspace.
This is a preparation step for configuration of clustered/partitioned
schedulers on SMP.
Diffstat (limited to 'cpukit/score/src/schedulercbsattachthread.c')
-rw-r--r-- | cpukit/score/src/schedulercbsattachthread.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/cpukit/score/src/schedulercbsattachthread.c b/cpukit/score/src/schedulercbsattachthread.c index ad9279176c..43bf92da66 100644 --- a/cpukit/score/src/schedulercbsattachthread.c +++ b/cpukit/score/src/schedulercbsattachthread.c @@ -33,11 +33,11 @@ int _Scheduler_CBS_Attach_thread ( return SCHEDULER_CBS_ERROR_INVALID_PARAMETER; /* Server is not valid. */ - if ( !_Scheduler_CBS_Server_list[server_id] ) + if ( !_Scheduler_CBS_Server_list[server_id].initialized ) return SCHEDULER_CBS_ERROR_NOSERVER; /* Server is already attached to a thread. */ - if ( _Scheduler_CBS_Server_list[server_id]->task_id != -1 ) + if ( _Scheduler_CBS_Server_list[server_id].task_id != -1 ) return SCHEDULER_CBS_ERROR_FULL; the_thread = _Thread_Get(task_id, &location); @@ -53,8 +53,8 @@ int _Scheduler_CBS_Attach_thread ( return SCHEDULER_CBS_ERROR_FULL; } - _Scheduler_CBS_Server_list[server_id]->task_id = task_id; - sched_info->cbs_server = (void *) _Scheduler_CBS_Server_list[server_id]; + _Scheduler_CBS_Server_list[server_id].task_id = task_id; + sched_info->cbs_server = &_Scheduler_CBS_Server_list[server_id]; the_thread->budget_callout = _Scheduler_CBS_Budget_callout; the_thread->budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_CALLOUT; |