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