20 #ifndef CONFIGURE_SCHEDULER_CBS 21 #error "cbs.h available only with CONFIGURE_SCHEDULER_CBS" 34 #define RTEMS_CBS_OK SCHEDULER_CBS_OK 35 #define RTEMS_CBS_ERROR_GENERIC SCHEDULER_CBS_ERROR_GENERIC 36 #define RTEMS_CBS_ERROR_NO_MEMORY SCHEDULER_CBS_ERROR_NO_MEMORY 37 #define RTEMS_CBS_ERROR_INVALID_PARAMETER SCHEDULER_CBS_ERROR_INVALID_PARAM 38 #define RTEMS_CBS_ERROR_UNAUTHORIZED SCHEDULER_CBS_ERROR_UNAUTHORIZED 39 #define RTEMS_CBS_ERROR_UNIMPLEMENTED SCHEDULER_CBS_ERROR_UNIMPLEMENTED 40 #define RTEMS_CBS_ERROR_MISSING_COMPONENT SCHEDULER_CBS_ERROR_MISSING_COMPONENT 41 #define RTEMS_CBS_ERROR_INCONSISTENT_STATE SCHEDULER_CBS_ERROR_INCONSISTENT_STATE 42 #define RTEMS_CBS_ERROR_SYSTEM_OVERLOAD SCHEDULER_CBS_ERROR_SYSTEM_OVERLOAD 43 #define RTEMS_CBS_ERROR_INTERNAL_ERROR SCHEDULER_CBS_ERROR_INTERNAL_ERROR 44 #define RTEMS_CBS_ERROR_NOT_FOUND SCHEDULER_CBS_ERROR_NOT_FOUND 45 #define RTEMS_CBS_ERROR_FULL SCHEDULER_CBS_ERROR_FULL 46 #define RTEMS_CBS_ERROR_EMPTY SCHEDULER_CBS_ERROR_EMPTY 47 #define RTEMS_CBS_ERROR_NOSERVER SCHEDULER_CBS_ERROR_NOSERVER 97 budget_overrun_callback,
217 time_t *remaining_budget
int _Scheduler_CBS_Create_server(Scheduler_CBS_Parameters *params, Scheduler_CBS_Budget_overrun budget_overrun_callback, rtems_id *server_id)
Creates a new server with specified parameters.
Definition: schedulercbscreateserver.c:24
int _Scheduler_CBS_Detach_thread(Scheduler_CBS_Server_id server_id, rtems_id task_id)
Detaches from the CBS Server.
Definition: schedulercbsdetachthread.c:25
RTEMS_INLINE_ROUTINE int rtems_cbs_get_server_id(rtems_id task_id, rtems_cbs_server_id *server_id)
Get CBS server id.
Definition: cbs.h:154
uint32_t Scheduler_CBS_Server_id
Definition: schedulercbs.h:95
RTEMS_INLINE_ROUTINE int rtems_cbs_get_approved_budget(rtems_cbs_server_id server_id, time_t *appr_budget)
Get the approved CBS budget.
Definition: cbs.h:231
Scheduler_CBS_Budget_overrun rtems_cbs_budget_overrun
Definition: cbs.h:50
int _Scheduler_CBS_Get_remaining_budget(Scheduler_CBS_Server_id server_id, time_t *remaining_budget)
Retrieves remaining budget for the current server instance.
Definition: schedulercbsgetremainingbudget.c:24
RTEMS_INLINE_ROUTINE int rtems_cbs_initialize(void)
Initialize the CBS library.
Definition: cbs.h:65
RTEMS_INLINE_ROUTINE int rtems_cbs_detach_thread(rtems_cbs_server_id server_id, rtems_id task_id)
Detach from the CBS server.
Definition: cbs.h:124
Scheduler_CBS_Server_id rtems_cbs_server_id
Definition: cbs.h:53
RTEMS_INLINE_ROUTINE int rtems_cbs_destroy_server(rtems_cbs_server_id server_id)
Detach all tasks from a server and destroy it.
Definition: cbs.h:139
int _Scheduler_CBS_Set_parameters(Scheduler_CBS_Server_id server_id, Scheduler_CBS_Parameters *parameters)
Sets parameters for CBS scheduling.
Definition: schedulercbssetparameters.c:25
int _Scheduler_CBS_Get_parameters(Scheduler_CBS_Server_id server_id, Scheduler_CBS_Parameters *params)
Retrieves CBS scheduling parameters.
Definition: schedulercbsgetparameters.c:26
RTEMS_INLINE_ROUTINE int rtems_cbs_get_parameters(rtems_cbs_server_id server_id, rtems_cbs_parameters *params)
Get CBS parameters.
Definition: cbs.h:169
RTEMS_INLINE_ROUTINE int rtems_cbs_create_server(rtems_cbs_parameters *params, rtems_cbs_budget_overrun budget_overrun_callback, rtems_cbs_server_id *server_id)
Create a new server with specified parameters.
Definition: cbs.h:89
int _Scheduler_CBS_Get_approved_budget(Scheduler_CBS_Server_id server_id, time_t *approved_budget)
Retrieves the approved budget.
Definition: schedulercbsgetapprovedbudget.c:25
int _Scheduler_CBS_Get_execution_time(Scheduler_CBS_Server_id server_id, time_t *exec_time, time_t *abs_time)
Gets relative time info.
Definition: schedulercbsgetexecutiontime.c:25
Definition: schedulercbs.h:105
void(* Scheduler_CBS_Budget_overrun)(Scheduler_CBS_Server_id server_id)
Definition: schedulercbs.h:98
RTEMS_INLINE_ROUTINE int rtems_cbs_attach_thread(rtems_cbs_server_id server_id, rtems_id task_id)
Attach a task to an already existing server.
Definition: cbs.h:109
RTEMS_INLINE_ROUTINE int rtems_cbs_set_parameters(rtems_cbs_server_id server_id, rtems_cbs_parameters *params)
Set CBS parameters.
Definition: cbs.h:184
RTEMS_INLINE_ROUTINE int rtems_cbs_cleanup(void)
Cleanup resources associated to the CBS Library.
Definition: cbs.h:77
int _Scheduler_CBS_Cleanup(void)
Cleans up resources associated to the CBS Library.
Definition: schedulercbscleanup.c:24
Scheduler_CBS_Parameters rtems_cbs_parameters
Definition: cbs.h:56
int _Scheduler_CBS_Get_server_id(rtems_id task_id, Scheduler_CBS_Server_id *server_id)
Gets a thread server id.
Definition: schedulercbsgetserverid.c:25
RTEMS_INLINE_ROUTINE int rtems_cbs_get_execution_time(rtems_cbs_server_id server_id, time_t *exec_time, time_t *abs_time)
Get the CBS get execution time.
Definition: cbs.h:199
int _Scheduler_CBS_Initialize(void)
_Scheduler_CBS_Initialize
Definition: schedulercbs.c:54
Objects_Id rtems_id
Used to manage and manipulate RTEMS object identifiers.
Definition: types.h:83
RTEMS_INLINE_ROUTINE int rtems_cbs_get_remaining_budget(rtems_cbs_server_id server_id, time_t *remaining_budget)
Get the remaining CBS budget.
Definition: cbs.h:215
int _Scheduler_CBS_Destroy_server(Scheduler_CBS_Server_id server_id)
Detaches all tasks from a server and destroys it.
Definition: schedulercbsdestroyserver.c:25
#define RTEMS_INLINE_ROUTINE
Definition: basedefs.h:66
int _Scheduler_CBS_Attach_thread(Scheduler_CBS_Server_id server_id, rtems_id task_id)
Attaches a task to an already existing server.
Definition: schedulercbsattachthread.c:24
Thread manipulation for the CBS scheduler.