summaryrefslogtreecommitdiff
path: root/ports/arm9/gnu/src/tx_thread_schedule.S
diff options
context:
space:
mode:
authorFrédéric Desbiens <[email protected]>2026-03-06 19:27:49 +0100
committerGitHub <[email protected]>2026-03-06 19:27:49 +0100
commit3726d7906b4808bfec7855fc088e073199df9120 (patch)
tree8789bfd03d1d49e1967e80d04aa4ff606fda43eb /ports/arm9/gnu/src/tx_thread_schedule.S
parent4b6e8100d932a3a67b34c6eb17f84f3bffb9e2ae (diff)
parentc3259a216026372e3833dd8996a68f77e8595fbd (diff)
Merge pull request #510 from eclipse-threadx/devv6.5.0.202601_rel
Merge changes ahead of the v6.5.0.202601 release
Diffstat (limited to 'ports/arm9/gnu/src/tx_thread_schedule.S')
-rw-r--r--ports/arm9/gnu/src/tx_thread_schedule.S75
1 files changed, 33 insertions, 42 deletions
diff --git a/ports/arm9/gnu/src/tx_thread_schedule.S b/ports/arm9/gnu/src/tx_thread_schedule.S
index 50affb8c..2cd8d04f 100644
--- a/ports/arm9/gnu/src/tx_thread_schedule.S
+++ b/ports/arm9/gnu/src/tx_thread_schedule.S
@@ -1,18 +1,18 @@
@/***************************************************************************
-@ * Copyright (c) 2024 Microsoft Corporation
-@ *
+@ * Copyright (c) 2024 Microsoft Corporation
+@ *
@ * This program and the accompanying materials are made available under the
@ * terms of the MIT License which is available at
@ * https://opensource.org/licenses/MIT.
-@ *
+@ *
@ * SPDX-License-Identifier: MIT
@ **************************************************************************/
@
@
@/**************************************************************************/
@/**************************************************************************/
-@/** */
-@/** ThreadX Component */
+@/** */
+@/** ThreadX Component */
@/** */
@/** Thread */
@/** */
@@ -45,7 +45,7 @@ ENABLE_INTS = 0x80 @ IRQ Interrupts enabled mask
$_tx_thread_schedule:
.thumb
BX pc @ Switch to 32-bit mode
- NOP @
+ NOP @
.arm
STMFD sp!, {lr} @ Save return address
BL _tx_thread_schedule @ Call _tx_thread_schedule function
@@ -55,48 +55,39 @@ $_tx_thread_schedule:
@
.text
.align 2
-@/**************************************************************************/
-@/* */
-@/* FUNCTION RELEASE */
-@/* */
-@/* _tx_thread_schedule ARM9/GNU */
+@/**************************************************************************/
+@/* */
+@/* FUNCTION RELEASE */
+@/* */
+@/* _tx_thread_schedule ARM9/GNU */
@/* 6.2.1 */
@/* AUTHOR */
@/* */
@/* William E. Lamie, Microsoft Corporation */
@/* */
@/* DESCRIPTION */
-@/* */
-@/* This function waits for a thread control block pointer to appear in */
-@/* the _tx_thread_execute_ptr variable. Once a thread pointer appears */
-@/* in the variable, the corresponding thread is resumed. */
-@/* */
-@/* INPUT */
-@/* */
-@/* None */
-@/* */
-@/* OUTPUT */
-@/* */
+@/* */
+@/* This function waits for a thread control block pointer to appear in */
+@/* the _tx_thread_execute_ptr variable. Once a thread pointer appears */
+@/* in the variable, the corresponding thread is resumed. */
+@/* */
+@/* INPUT */
+@/* */
@/* None */
-@/* */
-@/* CALLS */
-@/* */
+@/* */
+@/* OUTPUT */
+@/* */
@/* None */
-@/* */
-@/* CALLED BY */
-@/* */
-@/* _tx_initialize_kernel_enter ThreadX entry function */
-@/* _tx_thread_system_return Return to system from thread */
-@/* _tx_thread_context_restore Restore thread's context */
-@/* */
-@/* RELEASE HISTORY */
-@/* */
-@/* DATE NAME DESCRIPTION */
@/* */
-@/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-@/* 03-08-2023 Cindy Deng Modified comment(s), added */
-@/* #include tx_user.h, */
-@/* resulting in version 6.2.1 */
+@/* CALLS */
+@/* */
+@/* None */
+@/* */
+@/* CALLED BY */
+@/* */
+@/* _tx_initialize_kernel_enter ThreadX entry function */
+@/* _tx_thread_system_return Return to system from thread */
+@/* _tx_thread_context_restore Restore thread's context */
@/* */
@/**************************************************************************/
@VOID _tx_thread_schedule(VOID)
@@ -124,7 +115,7 @@ __tx_thread_schedule_loop:
@
@ }
@ while(_tx_thread_execute_ptr == TX_NULL);
-@
+@
@ /* Yes! We have a thread to execute. Lockout interrupts and
@ transfer control to it. */
@
@@ -133,7 +124,7 @@ __tx_thread_schedule_loop:
@ /* Setup the current thread pointer. */
@ _tx_thread_current_ptr = _tx_thread_execute_ptr;
@
- LDR r1, =_tx_thread_current_ptr @ Pickup address of current thread
+ LDR r1, =_tx_thread_current_ptr @ Pickup address of current thread
STR r0, [r1] @ Setup current thread pointer
@
@ /* Increment the run count for this thread. */
@@ -147,7 +138,7 @@ __tx_thread_schedule_loop:
@ /* Setup time-slice, if present. */
@ _tx_timer_time_slice = _tx_thread_current_ptr -> tx_thread_time_slice;
@
- LDR r2, =_tx_timer_time_slice @ Pickup address of time-slice
+ LDR r2, =_tx_timer_time_slice @ Pickup address of time-slice
@ variable
LDR sp, [r0, #8] @ Switch stack pointers
STR r3, [r2] @ Setup time-slice