19 #ifndef _RTEMS_SCORE_SCHEDULERCBS_H 20 #define _RTEMS_SCORE_SCHEDULERCBS_H 42 #define SCHEDULER_CBS_MAXIMUM_PRIORITY SCHEDULER_EDF_MAXIMUM_PRIORITY 50 #define SCHEDULER_CBS_ENTRY_POINTS \ 52 _Scheduler_EDF_Initialize, \ 53 _Scheduler_EDF_Schedule, \ 54 _Scheduler_EDF_Yield, \ 55 _Scheduler_EDF_Block, \ 56 _Scheduler_CBS_Unblock, \ 57 _Scheduler_EDF_Update_priority, \ 58 _Scheduler_EDF_Map_priority, \ 59 _Scheduler_EDF_Unmap_priority, \ 60 SCHEDULER_OPERATION_DEFAULT_ASK_FOR_HELP \ 61 _Scheduler_CBS_Node_initialize, \ 62 _Scheduler_default_Node_destroy, \ 63 _Scheduler_CBS_Release_job, \ 64 _Scheduler_CBS_Cancel_job, \ 65 _Scheduler_default_Tick, \ 66 _Scheduler_default_Start_idle \ 67 SCHEDULER_OPERATION_DEFAULT_GET_SET_AFFINITY \ 71 #define SCHEDULER_CBS_OK 0 72 #define SCHEDULER_CBS_ERROR_GENERIC -16 73 #define SCHEDULER_CBS_ERROR_NO_MEMORY -17 74 #define SCHEDULER_CBS_ERROR_INVALID_PARAMETER -18 75 #define SCHEDULER_CBS_ERROR_UNAUTHORIZED -19 76 #define SCHEDULER_CBS_ERROR_UNIMPLEMENTED -20 77 #define SCHEDULER_CBS_ERROR_MISSING_COMPONENT -21 78 #define SCHEDULER_CBS_ERROR_INCONSISTENT_STATE -22 79 #define SCHEDULER_CBS_ERROR_SYSTEM_OVERLOAD -23 80 #define SCHEDULER_CBS_ERROR_INTERNAL_ERROR -24 81 #define SCHEDULER_CBS_ERROR_NOT_FOUND -25 82 #define SCHEDULER_CBS_ERROR_FULL -26 83 #define SCHEDULER_CBS_ERROR_EMPTY -27 84 #define SCHEDULER_CBS_ERROR_NOSERVER SCHEDULER_CBS_ERROR_NOT_FOUND 94 Scheduler_CBS_Server_id server_id
149 void _Scheduler_CBS_Unblock(
155 void _Scheduler_CBS_Release_job(
163 void _Scheduler_CBS_Cancel_job(
187 Scheduler_CBS_Server_id server_id,
199 Scheduler_CBS_Server_id server_id,
235 Scheduler_CBS_Server_id server_id
247 Scheduler_CBS_Server_id server_id,
248 time_t *approved_budget
259 Scheduler_CBS_Server_id server_id,
260 time_t *remaining_budget
275 Scheduler_CBS_Server_id server_id,
288 Scheduler_CBS_Server_id server_id,
302 Scheduler_CBS_Server_id *server_id
316 Scheduler_CBS_Server_id server_id,
Scheduler_CBS_Parameters parameters
Definition: schedulercbs.h:118
Scheduler node specialization for EDF schedulers.
Definition: scheduleredf.h:85
int _Scheduler_CBS_Attach_thread(Scheduler_CBS_Server_id server_id, rtems_id task_id)
Attach a task to an already existing server.
Definition: schedulercbsattachthread.c:24
Thread queue context for the thread queue methods.
Definition: threadq.h:193
The priority node to build up a priority aggregation.
Definition: priority.h:94
time_t budget
Definition: schedulercbs.h:104
int _Scheduler_CBS_Get_server_id(rtems_id task_id, Scheduler_CBS_Server_id *server_id)
Get a thread server id.
Definition: schedulercbsgetserverid.c:25
int _Scheduler_CBS_Get_execution_time(Scheduler_CBS_Server_id server_id, time_t *exec_time, time_t *abs_time)
Get relative time info.
Definition: schedulercbsgetexecutiontime.c:25
Scheduler_EDF_Node Base
Definition: schedulercbs.h:135
rtems_id task_id
Definition: schedulercbs.h:116
Data Related to the Manipulation of Threads for the EDF Scheduler.
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:23
const uint32_t _Scheduler_CBS_Maximum_servers
void(* Scheduler_CBS_Budget_overrun)(Scheduler_CBS_Server_id server_id)
Definition: schedulercbs.h:93
Scheduler_CBS_Server * cbs_server
Definition: schedulercbs.h:137
time_t deadline
Definition: schedulercbs.h:102
uint64_t Priority_Control
The thread priority control.
Definition: priority.h:66
uint32_t Scheduler_CBS_Server_id
Definition: schedulercbs.h:90
bool initialized
Indicates if this CBS server is initialized.
Definition: schedulercbs.h:127
int _Scheduler_CBS_Set_parameters(Scheduler_CBS_Server_id server_id, Scheduler_CBS_Parameters *parameters)
Set parameters for CBS scheduling.
Definition: schedulercbssetparameters.c:25
int _Scheduler_CBS_Initialize(void)
_Scheduler_CBS_Initialize
Definition: schedulercbs.c:53
int _Scheduler_CBS_Get_approved_budget(Scheduler_CBS_Server_id server_id, time_t *approved_budget)
Retrieve the approved budget.
Definition: schedulercbsgetapprovedbudget.c:25
int _Scheduler_CBS_Get_parameters(Scheduler_CBS_Server_id server_id, Scheduler_CBS_Parameters *params)
Retrieve CBS scheduling parameters.
Definition: schedulercbsgetparameters.c:25
Constants and Structures Associated with the Red-Black Tree Handler.
Scheduler_CBS_Server _Scheduler_CBS_Server_list[]
Definition: schedulercbs.h:100
Definition: schedulercbs.h:110
int _Scheduler_CBS_Destroy_server(Scheduler_CBS_Server_id server_id)
Detach all tasks from a server and destroy it.
Definition: schedulercbsdestroyserver.c:25
int _Scheduler_CBS_Create_server(Scheduler_CBS_Parameters *params, Scheduler_CBS_Budget_overrun budget_overrun_callback, rtems_id *server_id)
Create a new server with specified parameters.
Definition: schedulercbscreateserver.c:24
int _Scheduler_CBS_Cleanup(void)
Cleanup resources associated to the CBS Library.
Definition: schedulercbscleanup.c:24
int _Scheduler_CBS_Detach_thread(Scheduler_CBS_Server_id server_id, rtems_id task_id)
Detach from the CBS Server.
Definition: schedulercbsdetachthread.c:25
Classic Timer Manager API.
Scheduler control.
Definition: scheduler.h:266
Scheduler node for per-thread data.
Definition: schedulernode.h:65
int _Scheduler_CBS_Get_remaining_budget(Scheduler_CBS_Server_id server_id, time_t *remaining_budget)
Retrieve remaining budget for the current server instance.
Definition: schedulercbsgetremainingbudget.c:24
Objects_Id rtems_id
Used to manage and manipulate RTEMS object identifiers.
Definition: types.h:83
void _Scheduler_CBS_Budget_callout(Thread_Control *the_thread)
Invoked when a limited time quantum is exceeded.
Definition: schedulercbs.c:23
Definition: schedulercbs.h:133
Constants and Structures Associated with the Scheduler.
Constants and Structures Related with the Thread Control Block.
Scheduler_CBS_Budget_overrun cbs_budget_overrun
Definition: schedulercbs.h:120