diff options
author | Joel Sherrill <joel.sherrill@OARcorp.com> | 2011-09-15 15:49:32 +0000 |
---|---|---|
committer | Joel Sherrill <joel.sherrill@OARcorp.com> | 2011-09-15 15:49:32 +0000 |
commit | 82db8e5675c79ddbdf6382308b0ff034e6f02103 (patch) | |
tree | 2aef1a6f350019f5a73501beaf6b875b69706099 /cpukit/sapi/include/rtems/cbs.h | |
parent | 2011-09-15 Sebastian Huber <sebastian.huber@embedded-brains.de> (diff) | |
download | rtems-82db8e5675c79ddbdf6382308b0ff034e6f02103.tar.bz2 |
2011-09-15 Petr Benes <benesp16@fel.cvut.cz>
PR 1906/cpukit
* sapi/Makefile.am, sapi/preinstall.am, sapi/include/confdefs.h,
score/Makefile.am, score/preinstall.am: Add the CBS (Constant
Bandwidth Server) scheduler. This is a complex scheduling policy
built atop of the EDF scheduler. Unlike other schedulers, this one
provides a user API and handles not only deadlines of tasks but also
claimed budget per period. The main aim of the scheduler is isolation
of tasks so that each task is guaranteed to meet all deadlines
regardless of how other tasks behave.
* sapi/include/rtems/cbs.h, sapi/inline/rtems/cbs.inl,
score/include/rtems/score/schedulercbs.h, score/src/schedulercbs.c,
score/src/schedulercbsattachthread.c,
score/src/schedulercbscleanup.c,
score/src/schedulercbscreateserver.c,
score/src/schedulercbsdestroyserver.c,
score/src/schedulercbsdetachthread.c,
score/src/schedulercbsgetapprovedbudget.c,
score/src/schedulercbsgetexecutiontime.c,
score/src/schedulercbsgetparameters.c,
score/src/schedulercbsgetremainingbudget.c,
score/src/schedulercbsgetserverid.c,
score/src/schedulercbsreleasejob.c,
score/src/schedulercbssetparameters.c,
score/src/schedulercbsunblock.c: New files.
Diffstat (limited to 'cpukit/sapi/include/rtems/cbs.h')
-rw-r--r-- | cpukit/sapi/include/rtems/cbs.h | 65 |
1 files changed, 65 insertions, 0 deletions
diff --git a/cpukit/sapi/include/rtems/cbs.h b/cpukit/sapi/include/rtems/cbs.h new file mode 100644 index 0000000000..d016e5cdec --- /dev/null +++ b/cpukit/sapi/include/rtems/cbs.h @@ -0,0 +1,65 @@ +/** + * @file rtems/cbs.h + * + * This include file contains all the constants and structures associated + * with the CBS library in RTEMS. + */ + +/* + * Copyright (C) 2011 Petr Benes. + * Copyright (C) 2011 On-Line Applications Research Corporation (OAR). + * + * The license and distribution terms for this file may be + * found in the file LICENSE in this distribution or at + * http://www.rtems.com/license/LICENSE. + * + * $Id$ + */ + +#ifndef CONFIGURE_SCHEDULER_CBS + #error "cbs.h available only with CONFIGURE_SCHEDULER_CBS" +#endif + +#ifndef _RTEMS_CBS_H +#define _RTEMS_CBS_H + +#ifdef __cplusplus +extern "C" { +#endif + +#include <stdint.h> +#include <rtems/score/schedulercbs.h> + +/* Return codes. */ +#define RTEMS_CBS_OK SCHEDULER_CBS_OK +#define RTEMS_CBS_ERROR_GENERIC SCHEDULER_CBS_ERROR_GENERIC +#define RTEMS_CBS_ERROR_NO_MEMORY SCHEDULER_CBS_ERROR_NO_MEMORY +#define RTEMS_CBS_ERROR_INVALID_PARAMETER SCHEDULER_CBS_ERROR_INVALID_PARAM +#define RTEMS_CBS_ERROR_UNAUTHORIZED SCHEDULER_CBS_ERROR_UNAUTHORIZED +#define RTEMS_CBS_ERROR_UNIMPLEMENTED SCHEDULER_CBS_ERROR_UNIMPLEMENTED +#define RTEMS_CBS_ERROR_MISSING_COMPONENT SCHEDULER_CBS_ERROR_MISSING_COMPONENT +#define RTEMS_CBS_ERROR_INCONSISTENT_STATE SCHEDULER_CBS_ERROR_INCONSISTENT_STATE +#define RTEMS_CBS_ERROR_SYSTEM_OVERLOAD SCHEDULER_CBS_ERROR_SYSTEM_OVERLOAD +#define RTEMS_CBS_ERROR_INTERNAL_ERROR SCHEDULER_CBS_ERROR_INTERNAL_ERROR +#define RTEMS_CBS_ERROR_NOT_FOUND SCHEDULER_CBS_ERROR_NOT_FOUND +#define RTEMS_CBS_ERROR_FULL SCHEDULER_CBS_ERROR_FULL +#define RTEMS_CBS_ERROR_EMPTY SCHEDULER_CBS_ERROR_EMPTY +#define RTEMS_CBS_ERROR_NOSERVER SCHEDULER_CBS_ERROR_NOSERVER + +/** Callback function invoked when a budget overrun of a task occurs. */ +typedef Scheduler_CBS_Budget_overrun rtems_cbs_budget_overrun; + +/** Server id. */ +typedef Scheduler_CBS_Server_id rtems_cbs_server_id; + +/** Server parameters. */ +typedef Scheduler_CBS_Parameters rtems_cbs_parameters; + +#include <rtems/cbs.inl> + +#ifdef __cplusplus +} +#endif + +#endif +/* end of include file */ |