Changeset b5ffa5e in rtems for cpukit/sapi


Ignore:
Timestamp:
Jul 23, 2013, 7:44:47 AM (6 years ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
4.11, master
Children:
98c7eaca
Parents:
be1b8a7
git-author:
Sebastian Huber <sebastian.huber@…> (07/23/13 07:44:47)
git-committer:
Sebastian Huber <sebastian.huber@…> (07/23/13 13:12:51)
Message:

sapi: Merge CBS API into one file

Location:
cpukit/sapi
Files:
1 deleted
3 edited

Legend:

Unmodified
Added
Removed
  • cpukit/sapi/Makefile.am

    rbe1b8a7 rb5ffa5e  
    2121
    2222include_rtems_HEADERS += inline/rtems/extension.inl
    23 include_rtems_HEADERS += inline/rtems/cbs.inl
    2423include_rtems_HEADERS += inline/rtems/rbtree.inl
    2524include_rtems_HEADERS += inline/rtems/timespec.inl
  • cpukit/sapi/include/rtems/cbs.h

    rbe1b8a7 rb5ffa5e  
    2525#define _RTEMS_CBS_H
    2626
     27#include <rtems/score/schedulercbs.h>
     28
    2729#ifdef __cplusplus
    2830extern "C" {
    2931#endif
    30 
    31 #include <stdint.h>
    32 #include <rtems/score/schedulercbs.h>
    3332
    3433/* Return codes. */
     
    5756typedef Scheduler_CBS_Parameters rtems_cbs_parameters;
    5857
    59 #include <rtems/cbs.inl>
     58/**
     59 * @brief Initialize the CBS library.
     60 *
     61 * Initializes the CBS library.
     62 *
     63 * @return status code.
     64 */
     65RTEMS_INLINE_ROUTINE int rtems_cbs_initialize ( void )
     66{
     67  return _Scheduler_CBS_Initialize();
     68}
     69
     70/**
     71 * @brief Cleanup resources associated to the CBS Library
     72 *
     73 * Cleanup resources associated to the CBS Library.
     74 *
     75 * @return status code.
     76 */
     77RTEMS_INLINE_ROUTINE int rtems_cbs_cleanup ( void )
     78{
     79  return _Scheduler_CBS_Cleanup();
     80}
     81
     82/**
     83 * @brief Create a new server with specified parameters.
     84 *
     85 * Create a new server with specified parameters.
     86 *
     87 * @return status code.
     88 */
     89RTEMS_INLINE_ROUTINE int rtems_cbs_create_server (
     90  rtems_cbs_parameters     *params,
     91  rtems_cbs_budget_overrun  budget_overrun_callback,
     92  rtems_cbs_server_id      *server_id
     93)
     94{
     95  return _Scheduler_CBS_Create_server(
     96             params,
     97             budget_overrun_callback,
     98             server_id
     99         );
     100}
     101
     102/**
     103 * @brief Attach a task to an already existing server.
     104 *
     105 * Attach a task to an already existing server.
     106 *
     107 * @return status code.
     108 */
     109RTEMS_INLINE_ROUTINE int rtems_cbs_attach_thread (
     110  rtems_cbs_server_id server_id,
     111  rtems_id            task_id
     112)
     113{
     114  return _Scheduler_CBS_Attach_thread( server_id, task_id );
     115}
     116
     117/**
     118 * @brief Detach from the CBS server.
     119 *
     120 * Detach from the CBS Server.
     121 *
     122 * @return status code.
     123 */
     124RTEMS_INLINE_ROUTINE int rtems_cbs_detach_thread (
     125  rtems_cbs_server_id server_id,
     126  rtems_id            task_id
     127)
     128{
     129  return _Scheduler_CBS_Detach_thread( server_id, task_id );
     130}
     131
     132/**
     133 * @brief Detach all tasks from a server and destroy it.
     134 *
     135 * Detach all tasks from a server and destroy it.
     136 *
     137 * @return status code.
     138 */
     139RTEMS_INLINE_ROUTINE int rtems_cbs_destroy_server (
     140  rtems_cbs_server_id server_id
     141)
     142{
     143  return _Scheduler_CBS_Destroy_server( server_id );
     144}
     145
     146/**
     147 * @brief Get CBS server id.
     148 *
     149 * Get a thread server id, or RTEMS_CBS_E_NOT_FOUND if it is not
     150 * attached to any server.
     151 *
     152 * @return status code.
     153 */
     154RTEMS_INLINE_ROUTINE int rtems_cbs_get_server_id (
     155  rtems_id             task_id,
     156  rtems_cbs_server_id *server_id
     157)
     158{
     159  return _Scheduler_CBS_Get_server_id( task_id, server_id );
     160}
     161
     162/**
     163 * @brief Get CBS parameters.
     164 *
     165 * Retrieve CBS scheduling parameters.
     166 *
     167 * @return status code.
     168 */
     169RTEMS_INLINE_ROUTINE int rtems_cbs_get_parameters (
     170  rtems_cbs_server_id   server_id,
     171  rtems_cbs_parameters *params
     172)
     173{
     174  return _Scheduler_CBS_Get_parameters( server_id, params );
     175}
     176
     177/**
     178 * @brief Set CBS parameters.
     179 *
     180 * Change CBS scheduling parameters.
     181 *
     182 * @return status code.
     183 */
     184RTEMS_INLINE_ROUTINE int rtems_cbs_set_parameters (
     185  rtems_cbs_server_id   server_id,
     186  rtems_cbs_parameters *params
     187)
     188{
     189  return _Scheduler_CBS_Set_parameters( server_id, params );
     190}
     191
     192/**
     193 * @brief Get the CBS get execution time.
     194 *
     195 * Retrieve time info relative to the current server.
     196 *
     197 * @return status code.
     198 */
     199RTEMS_INLINE_ROUTINE int rtems_cbs_get_execution_time (
     200  rtems_cbs_server_id    server_id,
     201  time_t                *exec_time,
     202  time_t                *abs_time
     203)
     204{
     205  return _Scheduler_CBS_Get_execution_time( server_id, exec_time, abs_time );
     206}
     207
     208/**
     209 * @brief Get the remaining CBS budget.
     210 *
     211 * Retrieve remaining budget for the current server instance.
     212 *
     213 * @return status code.
     214 */
     215RTEMS_INLINE_ROUTINE int rtems_cbs_get_remaining_budget (
     216  rtems_cbs_server_id  server_id,
     217  time_t              *remaining_budget
     218)
     219{
     220  return _Scheduler_CBS_Get_remaining_budget( server_id, remaining_budget );
     221}
     222
     223/**
     224 * @brief Get the approved CBS budget.
     225 *
     226 * Retrieve the budget that has been approved for the subsequent
     227 * server instances.
     228 *
     229 * @return status code.
     230 */
     231RTEMS_INLINE_ROUTINE int rtems_cbs_get_approved_budget (
     232  rtems_cbs_server_id  server_id,
     233  time_t              *appr_budget
     234)
     235{
     236  return _Scheduler_CBS_Get_approved_budget( server_id, appr_budget );
     237}
    60238
    61239#ifdef __cplusplus
  • cpukit/sapi/preinstall.am

    rbe1b8a7 rb5ffa5e  
    8585PREINSTALL_FILES += $(PROJECT_INCLUDE)/rtems/extension.inl
    8686
    87 $(PROJECT_INCLUDE)/rtems/cbs.inl: inline/rtems/cbs.inl $(PROJECT_INCLUDE)/rtems/$(dirstamp)
    88         $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/rtems/cbs.inl
    89 PREINSTALL_FILES += $(PROJECT_INCLUDE)/rtems/cbs.inl
    90 
    9187$(PROJECT_INCLUDE)/rtems/rbtree.inl: inline/rtems/rbtree.inl $(PROJECT_INCLUDE)/rtems/$(dirstamp)
    9288        $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/rtems/rbtree.inl
Note: See TracChangeset for help on using the changeset viewer.