1/**************************************************************************/ 2/* */ 3/* Copyright (c) Microsoft Corporation. All rights reserved. */ 4/* */ 5/* This software is licensed under the Microsoft Software License */ 6/* Terms for Microsoft Azure RTOS. Full text of the license can be */ 7/* found in the LICENSE file at https://aka.ms/AzureRTOS_EULA */ 8/* and in the root directory of this software. */ 9/* */ 10/**************************************************************************/ 11 12 13/**************************************************************************/ 14/**************************************************************************/ 15/** */ 16/** ThreadX Component */ 17/** */ 18/** Thread */ 19/** */ 20/**************************************************************************/ 21/**************************************************************************/ 22 23#ifdef TX_INCLUDE_USER_DEFINE_FILE 24#include "tx_user.h" 25#endif 26 27 .text 28 .align 4 29 .syntax unified 30#if (defined(TX_ENABLE_EXECUTION_CHANGE_NOTIFY) || defined(TX_EXECUTION_PROFILE_ENABLE)) 31 .global _tx_execution_isr_enter 32#endif 33/**************************************************************************/ 34/* */ 35/* FUNCTION RELEASE */ 36/* */ 37/* _tx_thread_context_save Cortex-Mx/AC6 */ 38/* 6.2.1 */ 39/* AUTHOR */ 40/* */ 41/* Scott Larson, Microsoft Corporation */ 42/* */ 43/* DESCRIPTION */ 44/* */ 45/* This function is only needed for legacy applications and it should */ 46/* not be called in any new development on a Cortex-M. */ 47/* */ 48/* INPUT */ 49/* */ 50/* None */ 51/* */ 52/* OUTPUT */ 53/* */ 54/* None */ 55/* */ 56/* CALLS */ 57/* */ 58/* [_tx_execution_isr_enter] Execution profiling ISR enter */ 59/* */ 60/* CALLED BY */ 61/* */ 62/* ISRs */ 63/* */ 64/* RELEASE HISTORY */ 65/* */ 66/* DATE NAME DESCRIPTION */ 67/* */ 68/* 06-02-2021 Scott Larson Initial Version 6.1.7 */ 69/* 03-08-2023 Scott Larson Include tx_user.h, */ 70/* resulting in version 6.2.1 */ 71/* */ 72/**************************************************************************/ 73// VOID _tx_thread_context_save(VOID) 74// { 75 .global _tx_thread_context_save 76 .thumb_func 77_tx_thread_context_save: 78 79#if (defined(TX_ENABLE_EXECUTION_CHANGE_NOTIFY) || defined(TX_EXECUTION_PROFILE_ENABLE)) 80 /* Call the ISR enter function to indicate an ISR is starting. */ 81 PUSH {r0, lr} // Save return address 82 BL _tx_execution_isr_enter // Call the ISR enter function 83 POP {r0, lr} // Recover return address 84#endif 85 86 /* Context is already saved - just return. */ 87 88 BX lr 89// } 90