From 240a1f79b1fcb58b9ae7bfc393e1f890e4492683 Mon Sep 17 00:00:00 2001 From: Sebastian Huber Date: Wed, 27 Oct 2021 12:59:09 +0200 Subject: score: Introduce CPU budget operations This patch set replaces the CPU budget algorithm enumeration with a set of CPU budget operations which implement a particular CPU budget algorithm. This helps to hide the CPU budget algorithm implementation details from the general thread handling. The CPU budget callouts are turned into CPU budget operations. This slightly reduces the size of the thread control block. All schedulers used the default scheduler tick implementation. The tick scheduler operation is removed and the CPU budget operations are directly used in _Watchdog_Tick() if the executing thread uses a CPU budget algorithm. This is performance improvement for all threads which do not use a CPU budget algorithm (default behaviour). --- cpukit/rtems/src/taskmode.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'cpukit/rtems/src/taskmode.c') diff --git a/cpukit/rtems/src/taskmode.c b/cpukit/rtems/src/taskmode.c index 96bed470f4..3300eafa28 100644 --- a/cpukit/rtems/src/taskmode.c +++ b/cpukit/rtems/src/taskmode.c @@ -73,7 +73,7 @@ rtems_status_code rtems_task_mode( old_mode = (executing->is_preemptible) ? RTEMS_PREEMPT : RTEMS_NO_PREEMPT; - if ( executing->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_NONE ) + if ( executing->CPU_budget.operations == NULL ) old_mode |= RTEMS_NO_TIMESLICE; else old_mode |= RTEMS_TIMESLICE; -- cgit v1.2.3