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 AREA ||.text||, CODE, READONLY 28/**************************************************************************/ 29/* */ 30/* FUNCTION RELEASE */ 31/* */ 32/* _tx_thread_interrupt_disable Cortex-Mx/AC5 */ 33/* 6.3.0 */ 34/* AUTHOR */ 35/* */ 36/* Scott Larson, Microsoft Corporation */ 37/* */ 38/* DESCRIPTION */ 39/* */ 40/* This function is responsible for disabling interrupts and returning */ 41/* the previous interrupt lockout posture. */ 42/* */ 43/* INPUT */ 44/* */ 45/* None */ 46/* */ 47/* OUTPUT */ 48/* */ 49/* old_posture Old interrupt lockout posture */ 50/* */ 51/* CALLS */ 52/* */ 53/* None */ 54/* */ 55/* CALLED BY */ 56/* */ 57/* Application Code */ 58/* */ 59/* RELEASE HISTORY */ 60/* */ 61/* DATE NAME DESCRIPTION */ 62/* */ 63/* 06-02-2021 Scott Larson Initial Version 6.1.7 */ 64/* 10-31-2023 Tiejun Zhou Included tx_user.h, */ 65/* resulting in version 6.3.0 */ 66/* */ 67/**************************************************************************/ 68// UINT _tx_thread_interrupt_disable(VOID) 69// { 70 EXPORT _tx_thread_interrupt_disable 71_tx_thread_interrupt_disable 72 /* Return current interrupt lockout posture. */ 73#ifdef TX_PORT_USE_BASEPRI 74 MRS r0, BASEPRI 75 LDR r1, =TX_PORT_BASEPRI 76 MSR BASEPRI, r1 77#else 78 MRS r0, PRIMASK 79 CPSID i 80#endif 81 BX lr 82// } 83 END 84