39#ifndef _RTEMS_SCORE_SCHEDULERCBS_H
40#define _RTEMS_SCORE_SCHEDULERCBS_H
66#define SCHEDULER_CBS_MAXIMUM_PRIORITY SCHEDULER_EDF_MAXIMUM_PRIORITY
74#define SCHEDULER_CBS_ENTRY_POINTS \
76 _Scheduler_EDF_Initialize, \
77 _Scheduler_EDF_Schedule, \
78 _Scheduler_EDF_Yield, \
79 _Scheduler_EDF_Block, \
80 _Scheduler_CBS_Unblock, \
81 _Scheduler_EDF_Update_priority, \
82 _Scheduler_EDF_Map_priority, \
83 _Scheduler_EDF_Unmap_priority, \
84 SCHEDULER_DEFAULT_SMP_OPERATIONS \
85 _Scheduler_CBS_Node_initialize, \
86 _Scheduler_default_Node_destroy, \
87 _Scheduler_CBS_Release_job, \
88 _Scheduler_CBS_Cancel_job, \
89 _Scheduler_default_Start_idle \
90 SCHEDULER_DEFAULT_SET_AFFINITY_OPERATION \
94#define SCHEDULER_CBS_OK 0
95#define SCHEDULER_CBS_ERROR_GENERIC -16
96#define SCHEDULER_CBS_ERROR_NO_MEMORY -17
97#define SCHEDULER_CBS_ERROR_INVALID_PARAMETER -18
98#define SCHEDULER_CBS_ERROR_UNAUTHORIZED -19
99#define SCHEDULER_CBS_ERROR_UNIMPLEMENTED -20
100#define SCHEDULER_CBS_ERROR_MISSING_COMPONENT -21
101#define SCHEDULER_CBS_ERROR_INCONSISTENT_STATE -22
102#define SCHEDULER_CBS_ERROR_SYSTEM_OVERLOAD -23
103#define SCHEDULER_CBS_ERROR_INTERNAL_ERROR -24
104#define SCHEDULER_CBS_ERROR_NOT_FOUND -25
105#define SCHEDULER_CBS_ERROR_FULL -26
106#define SCHEDULER_CBS_ERROR_EMPTY -27
107#define SCHEDULER_CBS_ERROR_NOSERVER SCHEDULER_CBS_ERROR_NOT_FOUND
324 time_t *approved_budget
341 time_t *remaining_budget
This header file provides the Timer Manager API.
Objects_Id rtems_id
This type represents RTEMS object identifiers.
Definition: types.h:94
uint64_t Priority_Control
The thread priority control.
Definition: priority.h:91
int _Scheduler_CBS_Get_server_id(rtems_id task_id, Scheduler_CBS_Server_id *server_id)
Gets a thread server id.
Definition: schedulercbsgetserverid.c:46
Scheduler_CBS_Server _Scheduler_CBS_Server_list[]
void _Scheduler_CBS_Release_job(const Scheduler_Control *scheduler, Thread_Control *the_thread, Priority_Node *priority_node, uint64_t deadline, Thread_queue_Context *queue_context)
Releases a job.
Definition: schedulercbsreleasejob.c:44
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:45
int _Scheduler_CBS_Cleanup(void)
Cleans up resources associated to the CBS Library.
Definition: schedulercbscleanup.c:44
void(* Scheduler_CBS_Budget_overrun)(Scheduler_CBS_Server_id server_id)
Definition: schedulercbs.h:116
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:45
int _Scheduler_CBS_Get_approved_budget(Scheduler_CBS_Server_id server_id, time_t *approved_budget)
Retrieves the approved budget.
Definition: schedulercbsgetapprovedbudget.c:46
int _Scheduler_CBS_Detach_thread(Scheduler_CBS_Server_id server_id, rtems_id task_id)
Detaches from the CBS Server.
Definition: schedulercbsdetachthread.c:45
int _Scheduler_CBS_Destroy_server(Scheduler_CBS_Server_id server_id)
Detaches all tasks from a server and destroys it.
Definition: schedulercbsdestroyserver.c:44
void _Scheduler_CBS_Cancel_job(const Scheduler_Control *scheduler, Thread_Control *the_thread, Priority_Node *priority_node, Thread_queue_Context *queue_context)
Cancels a job.
Definition: schedulercbsreleasejob.c:74
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:45
void _Scheduler_CBS_Node_initialize(const Scheduler_Control *scheduler, Scheduler_Node *node, Thread_Control *the_thread, Priority_Control priority)
Initializes a CBS specific scheduler node of the_thread.
Definition: schedulercbsnodeinit.c:44
const Thread_CPU_budget_operations _Scheduler_CBS_Budget
These are the CBS CPU budget operations.
Definition: schedulercbs.c:103
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:45
const uint32_t _Scheduler_CBS_Maximum_servers
int _Scheduler_CBS_Initialize(void)
_Scheduler_CBS_Initialize
Definition: schedulercbs.c:109
void _Scheduler_CBS_Unblock(const Scheduler_Control *scheduler, Thread_Control *the_thread, Scheduler_Node *node)
Unblocks a thread.
Definition: schedulercbsunblock.c:48
int _Scheduler_CBS_Get_parameters(Scheduler_CBS_Server_id server_id, Scheduler_CBS_Parameters *params)
Retrieves CBS scheduling parameters.
Definition: schedulercbsgetparameters.c:46
uint32_t Scheduler_CBS_Server_id
Definition: schedulercbs.h:113
int _Scheduler_CBS_Set_parameters(Scheduler_CBS_Server_id server_id, Scheduler_CBS_Parameters *parameters)
Sets parameters for CBS scheduling.
Definition: schedulercbssetparameters.c:45
This header file defines the parts of the Signal Manager API.
This header file provides interfaces of the Priority Handler which are used by the implementation and...
This header file provides interfaces of the Red-Black Tree Handler which are used by the implementati...
This header file provides interfaces of the EDF Scheduler which are used by the implementation and th...
This header file provides interfaces of the Chain Handler which are used by the implementation and th...
This header file provides interfaces of the Scheduler Handler which are used by the implementation an...
This header file provides interfaces of the Thread Handler which are used by the implementation and t...
The priority node to build up a priority aggregation.
Definition: priority.h:112
Definition: schedulercbs.h:156
Scheduler_CBS_Server * cbs_server
Definition: schedulercbs.h:160
Scheduler_EDF_Node Base
Definition: schedulercbs.h:158
Definition: schedulercbs.h:123
time_t deadline
Definition: schedulercbs.h:125
time_t budget
Definition: schedulercbs.h:127
Definition: schedulercbs.h:133
Scheduler_CBS_Parameters parameters
Definition: schedulercbs.h:141
rtems_id task_id
Definition: schedulercbs.h:139
bool initialized
Indicates if this CBS server is initialized.
Definition: schedulercbs.h:150
Scheduler_CBS_Budget_overrun cbs_budget_overrun
Definition: schedulercbs.h:143
Scheduler node specialization for EDF schedulers.
Definition: scheduleredf.h:107
Scheduler node for per-thread data.
Definition: schedulernode.h:94
This structure contains operations which manage the CPU budget of a thread.
Definition: thread.h:188
Thread queue context for the thread queue methods.
Definition: threadq.h:216
Scheduler control.
Definition: scheduler.h:337