21 #ifndef _RTEMS_SCORE_SCHEDULERCBS_H 22 #define _RTEMS_SCORE_SCHEDULERCBS_H 47 #define SCHEDULER_CBS_MAXIMUM_PRIORITY SCHEDULER_EDF_MAXIMUM_PRIORITY 55 #define SCHEDULER_CBS_ENTRY_POINTS \ 57 _Scheduler_EDF_Initialize, \ 58 _Scheduler_EDF_Schedule, \ 59 _Scheduler_EDF_Yield, \ 60 _Scheduler_EDF_Block, \ 61 _Scheduler_CBS_Unblock, \ 62 _Scheduler_EDF_Update_priority, \ 63 _Scheduler_EDF_Map_priority, \ 64 _Scheduler_EDF_Unmap_priority, \ 65 SCHEDULER_OPERATION_DEFAULT_ASK_FOR_HELP \ 66 _Scheduler_CBS_Node_initialize, \ 67 _Scheduler_default_Node_destroy, \ 68 _Scheduler_CBS_Release_job, \ 69 _Scheduler_CBS_Cancel_job, \ 70 _Scheduler_default_Tick, \ 71 _Scheduler_default_Start_idle \ 72 SCHEDULER_OPERATION_DEFAULT_GET_SET_AFFINITY \ 76 #define SCHEDULER_CBS_OK 0 77 #define SCHEDULER_CBS_ERROR_GENERIC -16 78 #define SCHEDULER_CBS_ERROR_NO_MEMORY -17 79 #define SCHEDULER_CBS_ERROR_INVALID_PARAMETER -18 80 #define SCHEDULER_CBS_ERROR_UNAUTHORIZED -19 81 #define SCHEDULER_CBS_ERROR_UNIMPLEMENTED -20 82 #define SCHEDULER_CBS_ERROR_MISSING_COMPONENT -21 83 #define SCHEDULER_CBS_ERROR_INCONSISTENT_STATE -22 84 #define SCHEDULER_CBS_ERROR_SYSTEM_OVERLOAD -23 85 #define SCHEDULER_CBS_ERROR_INTERNAL_ERROR -24 86 #define SCHEDULER_CBS_ERROR_NOT_FOUND -25 87 #define SCHEDULER_CBS_ERROR_FULL -26 88 #define SCHEDULER_CBS_ERROR_EMPTY -27 89 #define SCHEDULER_CBS_ERROR_NOSERVER SCHEDULER_CBS_ERROR_NOT_FOUND 306 time_t *approved_budget
323 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
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:54
uint32_t Scheduler_CBS_Server_id
Definition: schedulercbs.h:95
Scheduler_CBS_Parameters parameters
Definition: schedulercbs.h:123
uint64_t Priority_Control
The thread priority control.
Definition: priority.h:70
const uint32_t _Scheduler_CBS_Maximum_servers
Scheduler node specialization for EDF schedulers.
Definition: scheduleredf.h:90
Thread queue context for the thread queue methods.
Definition: threadq.h:198
The priority node to build up a priority aggregation.
Definition: priority.h:98
time_t budget
Definition: schedulercbs.h:109
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
Scheduler_EDF_Node Base
Definition: schedulercbs.h:140
rtems_id task_id
Definition: schedulercbs.h:121
Data Related to the Manipulation of Threads for the EDF Scheduler.
Scheduler_CBS_Server * cbs_server
Definition: schedulercbs.h:142
int _Scheduler_CBS_Set_parameters(Scheduler_CBS_Server_id server_id, Scheduler_CBS_Parameters *parameters)
Sets parameters for CBS scheduling.
Definition: schedulercbssetparameters.c:25
time_t deadline
Definition: schedulercbs.h:107
int _Scheduler_CBS_Get_parameters(Scheduler_CBS_Server_id server_id, Scheduler_CBS_Parameters *params)
Retrieves CBS scheduling parameters.
Definition: schedulercbsgetparameters.c:26
bool initialized
Indicates if this CBS server is initialized.
Definition: schedulercbs.h:132
Scheduler_CBS_Server _Scheduler_CBS_Server_list[]
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
Constants and Structures Associated with the Red-Black Tree Handler.
void _Scheduler_CBS_Unblock(const Scheduler_Control *scheduler, Thread_Control *the_thread, Scheduler_Node *node)
Unblocks a thread.
Definition: schedulercbsunblock.c:28
void _Scheduler_CBS_Budget_callout(Thread_Control *the_thread)
Invoked when a limited time quantum is exceeded.
Definition: schedulercbs.c:24
Definition: schedulercbs.h:105
void(* Scheduler_CBS_Budget_overrun)(Scheduler_CBS_Server_id server_id)
Definition: schedulercbs.h:98
Definition: schedulercbs.h:115
int _Scheduler_CBS_Cleanup(void)
Cleans up resources associated to the CBS Library.
Definition: schedulercbscleanup.c:24
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
Classic Timer Manager API.
Scheduler control.
Definition: scheduler.h:269
Scheduler node for per-thread data.
Definition: schedulernode.h:79
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
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
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:24
Definition: schedulercbs.h:138
int _Scheduler_CBS_Destroy_server(Scheduler_CBS_Server_id server_id)
Detaches all tasks from a server and destroys it.
Definition: schedulercbsdestroyserver.c:25
Constants and Structures Associated with the Scheduler.
Constants and Structures Related with the Thread Control Block.
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
Scheduler_CBS_Budget_overrun cbs_budget_overrun
Definition: schedulercbs.h:125