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#ifdef TX_INCLUDE_USER_DEFINE_FILE 23#include "tx_user.h" 24#endif 25 26 .text 32 27 .align 4 28 .syntax unified 29/**************************************************************************/ 30/* */ 31/* FUNCTION RELEASE */ 32/* */ 33/* _tx_thread_interrupt_disable Cortex-Mx/AC6 */ 34/* 6.2.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/* 06-02-2021 Scott Larson Initial Version 6.1.7 */ 65/* 03-08-2023 Scott Larson Include tx_user.h, */ 66/* resulting in version 6.2.1 */ 67/* */ 68/**************************************************************************/ 69// UINT _tx_thread_interrupt_disable(VOID) 70// { 71 .global _tx_thread_interrupt_disable 72 .thumb_func 73_tx_thread_interrupt_disable: 74 /* Return current interrupt lockout posture. */ 75#ifdef TX_PORT_USE_BASEPRI 76 MRS r0, BASEPRI 77 LDR r1, =TX_PORT_BASEPRI 78 MSR BASEPRI, r1 79#else 80 MRS r0, PRIMASK 81 CPSID i 82#endif 83 BX lr 84// } 85