;/**************************************************************************/ ;/* */ ;/* Copyright (c) Microsoft Corporation. All rights reserved. */ ;/* */ ;/* This software is licensed under the Microsoft Software License */ ;/* Terms for Microsoft Azure RTOS. Full text of the license can be */ ;/* found in the LICENSE file at https://aka.ms/AzureRTOS_EULA */ ;/* and in the root directory of this software. */ ;/* */ ;/**************************************************************************/ ; ; ;/**************************************************************************/ ;/**************************************************************************/ ;/** */ ;/** ThreadX Component */ ;/** */ ;/** Thread */ ;/** */ ;/**************************************************************************/ ;/**************************************************************************/ ; ;#define TX_SOURCE_CODE ; ; ;/* Include necessary system files. */ ; ;#include "tx_api.h" ;#include "tx_thread.h" ; ; FP .set A15 DP .set B14 SP .set B15 ; ; .sect ".text" ;/**************************************************************************/ ;/* */ ;/* FUNCTION RELEASE */ ;/* */ ;/* _tx_thread_interrupt_control C667x/TI */ ;/* 6.1 */ ;/* AUTHOR */ ;/* */ ;/* William E. Lamie, Microsoft Corporation */ ;/* */ ;/* DESCRIPTION */ ;/* */ ;/* This function is responsible for changing the interrupt lockout */ ;/* posture of the system. */ ;/* */ ;/* INPUT */ ;/* */ ;/* new_posture New interrupt lockout posture */ ;/* */ ;/* OUTPUT */ ;/* */ ;/* old_posture Old interrupt lockout posture */ ;/* */ ;/* CALLS */ ;/* */ ;/* None */ ;/* */ ;/* CALLED BY */ ;/* */ ;/* Application Code */ ;/* */ ;/* RELEASE HISTORY */ ;/* */ ;/* DATE NAME DESCRIPTION */ ;/* */ ;/* 09-30-2020 William E. Lamie Initial Version 6.1 */ ;/* */ ;/**************************************************************************/ ;UINT _tx_thread_interrupt_control(UINT new_posture) ;{ .global _tx_thread_interrupt_control _tx_thread_interrupt_control: ; ; /* Pickup current interrupt lockout posture. */ ; MVC CSR,B0 ; Pickup current CSR ; ; /* Apply the new interrupt posture. */ ; B B3 ; Return to caller AND -2,B0,B0 ; Clear GIE bit OR A4,B0,B0 ; Build new interrupt posture MVC CSR,B1 ; Return previous posture MVC B0,CSR ; Apply new interrupt posture AND 1,B1,A4 ; Clear non-GIE bits ; ;}