source: rtems/cpukit/score/src/schedulerpriorityupdate.c @ 4d1f500

4.115
Last change on this file since 4d1f500 was 4d1f500, checked in by Sebastian Huber <sebastian.huber@…>, on 06/03/14 at 13:58:30

score: Rename _Scheduler_Update()

Rename _Scheduler_Update() to _Scheduler_Update_priority(). Add
parameter for the new thread priority to avoid direct usage of
Thread_Control::current_priority in the scheduler operation.

  • Property mode set to 100644
File size: 929 bytes
Line 
1/**
2 * @file
3 *
4 * @brief Update Scheduler Priority
5 * @ingroup ScoreScheduler
6 */
7
8/*
9 *  Copyright (C) 2010 Gedare Bloom.
10 *  Copyright (C) 2011 On-Line Applications Research Corporation (OAR).
11 *
12 *  The license and distribution terms for this file may be
13 *  found in the file LICENSE in this distribution or at
14 *  http://www.rtems.org/license/LICENSE.
15 */
16
17#if HAVE_CONFIG_H
18#include "config.h"
19#endif
20
21#include <rtems/score/schedulerpriorityimpl.h>
22
23void _Scheduler_priority_Update_priority(
24  const Scheduler_Control *scheduler,
25  Thread_Control          *the_thread,
26  Priority_Control         new_priority
27)
28{
29  Scheduler_priority_Context *context =
30    _Scheduler_priority_Get_context( scheduler );
31  Scheduler_priority_Node *node = _Scheduler_priority_Node_get( the_thread );
32
33  _Scheduler_priority_Ready_queue_update(
34    &node->Ready_queue,
35    new_priority,
36    &context->Bit_map,
37    &context->Ready[ 0 ]
38  );
39}
Note: See TracBrowser for help on using the repository browser.