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