source: rtems/cpukit/score/src/schedulercbssetparameters.c @ e6f7f81

4.115
Last change on this file since e6f7f81 was f839bf5a, checked in by Christopher Kerl <zargyyoyo@…>, on 12/01/12 at 14:47:07

score misc: Score misc: Clean up Doxygen #10 (GCI 2012)

This patch is a task from GCI 2012 which improves the Doxygen
comments in the RTEMS source.

http://www.google-melange.com/gci/task/view/google/gci2012/7983216

  • Property mode set to 100644
File size: 1.1 KB
Line 
1/**
2 * @file
3 *
4 * @brief Set Parameters for CBS Scheduling
5 *
6 * @ingroup ScoreScheduler
7 */
8
9/*
10 *  Copyright (C) 2011 Petr Benes.
11 *  Copyright (C) 2011 On-Line Applications Research Corporation (OAR).
12 *
13 *  The license and distribution terms for this file may be
14 *  found in the file LICENSE in this distribution or at
15 *  http://www.rtems.com/license/LICENSE.
16 */
17
18#if HAVE_CONFIG_H
19#include "config.h"
20#endif
21
22#include <rtems/system.h>
23#include <rtems/config.h>
24#include <rtems/score/scheduler.h>
25#include <rtems/score/schedulercbs.h>
26
27int _Scheduler_CBS_Set_parameters (
28  Scheduler_CBS_Server_id   server_id,
29  Scheduler_CBS_Parameters *params
30)
31{
32  if ( server_id >= _Scheduler_CBS_Maximum_servers )
33    return SCHEDULER_CBS_ERROR_INVALID_PARAMETER;
34
35  if ( params->budget <= 0 ||
36       params->deadline <= 0 ||
37       params->budget >= SCHEDULER_EDF_PRIO_MSB ||
38       params->deadline >= SCHEDULER_EDF_PRIO_MSB )
39    return SCHEDULER_CBS_ERROR_INVALID_PARAMETER;
40
41  if ( !_Scheduler_CBS_Server_list[server_id] )
42    return SCHEDULER_CBS_ERROR_NOSERVER;
43
44  _Scheduler_CBS_Server_list[server_id]->parameters = *params;
45  return SCHEDULER_CBS_OK;
46}
Note: See TracBrowser for help on using the repository browser.