summaryrefslogtreecommitdiffstats
path: root/cpukit/sapi/include/rtems/cbs.h
blob: d016e5cdec28b899cf1583b41f0c3971a563b9f2 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
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 */