diff options
Diffstat (limited to 'ports/arm11/gnu/src/tx_thread_schedule.S')
| -rw-r--r-- | ports/arm11/gnu/src/tx_thread_schedule.S | 75 |
1 files changed, 33 insertions, 42 deletions
diff --git a/ports/arm11/gnu/src/tx_thread_schedule.S b/ports/arm11/gnu/src/tx_thread_schedule.S index 9350540c..2901fbef 100644 --- a/ports/arm11/gnu/src/tx_thread_schedule.S +++ b/ports/arm11/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 ARM11/GNU */ +@/**************************************************************************/ +@/* */ +@/* FUNCTION RELEASE */ +@/* */ +@/* _tx_thread_schedule ARM11/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 |
