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;/** ThreadX Component */ 15;/** */ 16;/** Thread */ 17;/** */ 18;/**************************************************************************/ 19;/**************************************************************************/ 20#ifdef TX_INCLUDE_USER_DEFINE_FILE 21#include "tx_user.h" 22#endif 23 24;/**************************************************************************/ 25;/* */ 26;/* FUNCTION RELEASE */ 27;/* */ 28;/* _tx_thread_interrupt_control ARC_HS/MetaWare */ 29;/* 6.2.1 */ 30;/* AUTHOR */ 31;/* */ 32;/* William E. Lamie, Microsoft Corporation */ 33;/* */ 34;/* DESCRIPTION */ 35;/* */ 36;/* This function is responsible for changing the interrupt lockout */ 37;/* posture of the system. */ 38;/* */ 39;/* INPUT */ 40;/* */ 41;/* new_posture New interrupt lockout posture */ 42;/* */ 43;/* OUTPUT */ 44;/* */ 45;/* old_posture Old interrupt lockout posture */ 46;/* */ 47;/* CALLS */ 48;/* */ 49;/* None */ 50;/* */ 51;/* CALLED BY */ 52;/* */ 53;/* Application Code */ 54;/* */ 55;/* RELEASE HISTORY */ 56;/* */ 57;/* DATE NAME DESCRIPTION */ 58;/* */ 59;/* 09-30-2020 William E. Lamie Initial Version 6.1 */ 60;/* 04-02-2021 Andres Mlinar Modified comments, */ 61;/* resulting in version 6.1.6 */ 62;/* 03-08-2023 Cindy Deng Modified comment(s), added */ 63;/* #include tx_user.h, */ 64;/* resulting in version 6.2.1 */ 65;/* */ 66;/**************************************************************************/ 67;UINT _tx_thread_interrupt_control(UINT new_posture) 68;{ 69 .global _tx_thread_interrupt_control 70 .type _tx_thread_interrupt_control, @function 71_tx_thread_interrupt_control: 72; 73; /* Pickup current interrupt lockout posture. */ 74; 75 clri r1 ; Get current interrupt state 76; 77; /* Apply the new interrupt posture. */ 78; 79 seti r0 ; Set desired interrupt state 80 j_s.d [blink] ; Return to caller with delay slot 81 mov r0, r1 ; Return previous mask value. Return value is TX_INT_DISABLE or TX_INT_ENABLE. 82; 83;} 84 .end 85