1/*************************************************************************** 2 * Copyright (c) 2024 Microsoft Corporation 3 * 4 * This program and the accompanying materials are made available under the 5 * terms of the MIT License which is available at 6 * https://opensource.org/licenses/MIT. 7 * 8 * SPDX-License-Identifier: MIT 9 **************************************************************************/ 10 11 12/**************************************************************************/ 13/**************************************************************************/ 14/** */ 15/** ThreadX Component */ 16/** */ 17/** Thread */ 18/** */ 19/**************************************************************************/ 20/**************************************************************************/ 21 22 .text 23 .align 4 24/**************************************************************************/ 25/* */ 26/* FUNCTION RELEASE */ 27/* */ 28/* _tx_thread_context_save Cortex-Mx/GHS */ 29/* 6.1.7 */ 30/* AUTHOR */ 31/* */ 32/* Scott Larson, Microsoft Corporation */ 33/* */ 34/* DESCRIPTION */ 35/* */ 36/* This function is only needed for legacy applications and it should */ 37/* not be called in any new development on a Cortex-M. */ 38/* */ 39/* INPUT */ 40/* */ 41/* None */ 42/* */ 43/* OUTPUT */ 44/* */ 45/* None */ 46/* */ 47/* CALLS */ 48/* */ 49/* [_tx_execution_isr_enter] Execution profiling ISR enter */ 50/* */ 51/* CALLED BY */ 52/* */ 53/* ISRs */ 54/* */ 55/* RELEASE HISTORY */ 56/* */ 57/* DATE NAME DESCRIPTION */ 58/* */ 59/* 06-02-2021 Scott Larson Initial Version 6.1.7 */ 60/* */ 61/**************************************************************************/ 62// VOID _tx_thread_context_save(VOID) 63// { 64 .globl _tx_thread_context_save 65_tx_thread_context_save: 66 67#ifdef TX_ENABLE_EXECUTION_CHANGE_NOTIFY 68 /* Call the ISR enter function to indicate an ISR is starting. */ 69 PUSH {r0, lr} // Save return address 70 BL _tx_execution_isr_enter // Call the ISR enter function 71 POP {r0, lr} // Recover return address 72#endif 73 74 /* Context is already saved - just return. */ 75 76 BX lr 77// } 78 .type _tx_thread_context_save,$function 79 .size _tx_thread_context_save,.-_tx_thread_context_save 80