Skip to content

Commit 035f9e5

Browse files
RTX5: fix Round-Robin (ARM-software#228, ARM-software#1000)
Round-Robin timeout value is not reset any more when switching to higher priority threads.
1 parent 9246c24 commit 035f9e5

File tree

2 files changed

+1
-8
lines changed

2 files changed

+1
-8
lines changed

CMSIS/DoxyGen/RTOS2/src/cmsis_os2.txt

-8
Original file line numberDiff line numberDiff line change
@@ -290,9 +290,6 @@ a blocking RTOS-call execution is switched back to thread 3 immediately during t
290290
At time index 5 thread 3 uses a blocking RTOS-call as well. Thus the scheduler switches back to thread 2 for time index 6.
291291
At time index 7 the scheduler uses the round-robin mechanism to switch to thread 1 and so on.
292292

293-
\note Refer to limitations this type of scheduling in the \ref systemConfig_rr configuration section.
294-
295-
296293
\section MemoryAllocation Memory Allocation
297294

298295
RTX5 objects (thread, mutex, semaphore, timer, message queue, thread and event flags, as well as memory pool) require
@@ -807,11 +804,6 @@ In other words, threads execute for the duration of their time slice (unless a t
807804
switches to the next thread that is in \b READY state and has the same priority. If no other thread with the same priority is
808805
ready to run, the current running thread resumes it execution.
809806

810-
\note
811-
When switching to higher priority threads, the round-robin timeout value is reset. This might lead to conditions where
812-
threads with the same priority as the interrupted thread are blocked for a longer period of time or even never called
813-
again. You can avoid this by using \ref osThreadYield to pass control to the next thread in the \b READY state.
814-
815807
Round-Robin multitasking is controlled with the <b>\#define OS_ROBIN_ENABLE</b>. The time slice period is configured (in RTX
816808
timer ticks) with the <b>\#define OS_ROBIN_TIMEOUT</b>.
817809

CMSIS/DoxyGen/RTOS2/src/history.txt

+1
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,7 @@
103103
<td>
104104
- CVE-2021-27431 vulnerability mitigation.
105105
- Added OS Initialization for IAR.
106+
- Fixed Round-Robin (timeout value is not reset when switching to higher priority threads).
106107
- Enhanced stack overrun checking.
107108
- Updated configuration (Event Recorder).
108109
- Reorganized and optimized IRQ modules.

0 commit comments

Comments
 (0)