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;#define TX_SOURCE_CODE 23; 24; 25;/* Include necessary system files. */ 26; 27;#include "tx_api.h" 28;#include "tx_thread.h" 29; 30; 31 AREA ||.text||, CODE, READONLY 32;/**************************************************************************/ 33;/* */ 34;/* FUNCTION RELEASE */ 35;/* */ 36;/* _tx_thread_interrupt_restore ARM11/AC5 */ 37;/* 6.1 */ 38;/* AUTHOR */ 39;/* */ 40;/* William E. Lamie, Microsoft Corporation */ 41;/* */ 42;/* DESCRIPTION */ 43;/* */ 44;/* This function is responsible for restoring interrupts to the state */ 45;/* returned by a previous _tx_thread_interrupt_disable call. */ 46;/* */ 47;/* INPUT */ 48;/* */ 49;/* old_posture Old interrupt lockout posture */ 50;/* */ 51;/* OUTPUT */ 52;/* */ 53;/* None */ 54;/* */ 55;/* CALLS */ 56;/* */ 57;/* None */ 58;/* */ 59;/* CALLED BY */ 60;/* */ 61;/* Application Code */ 62;/* */ 63;/* RELEASE HISTORY */ 64;/* */ 65;/* DATE NAME DESCRIPTION */ 66;/* */ 67;/* 09-30-2020 William E. Lamie Initial Version 6.1 */ 68;/* */ 69;/**************************************************************************/ 70;UINT _tx_thread_interrupt_restore(UINT old_posture) 71;{ 72 EXPORT _tx_thread_interrupt_restore 73_tx_thread_interrupt_restore 74; 75; /* Apply the new interrupt posture. */ 76; 77 MSR CPSR_cxsf, r0 ; Setup new CPSR 78 IF {INTER} = {TRUE} 79 BX lr ; Return to caller 80 ELSE 81 MOV pc, lr ; Return to caller 82 ENDIF 83;} 84; 85 END 86 87