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;/**                                                                       */
16;/** ThreadX Component                                                     */
17;/**                                                                       */
18;/**   Thread                                                              */
19;/**                                                                       */
20;/**************************************************************************/
21;/**************************************************************************/
22;
23;#define TX_SOURCE_CODE
24;
25;
26;/* Include necessary system files.  */
27;
28;#include "tx_api.h"
29;#include "tx_thread.h"
30;
31;
32;/**************************************************************************/
33;/*                                                                        */
34;/*  FUNCTION                                               RELEASE        */
35;/*                                                                        */
36;/*    _tx_thread_interrupt_restore                        ARM11/IAR       */
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;void   _tx_thread_interrupt_restore(UINT old_posture)
71;{
72    RSEG    .text:CODE:NOROOT(2)
73    PUBLIC  _tx_thread_interrupt_restore
74    CODE32
75_tx_thread_interrupt_restore
76;
77;    /* Apply the new interrupt posture.  */
78;
79    MSR     CPSR_cxsf, r0                       ; Setup new CPSR
80#ifdef TX_THUMB
81    BX      lr                                  ; Return to caller
82#else
83    MOV     pc, lr                              ; Return to caller
84#endif
85;}
86;
87    END
88