/**************************************************************************/ /* */ /* 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" /**************************************************************************/ /* */ /* FUNCTION RELEASE */ /* */ /* _tx_thread_fp_disable ARMv8-A */ /* 6.1.10 */ /* AUTHOR */ /* */ /* William E. Lamie, Microsoft Corporation */ /* */ /* DESCRIPTION */ /* */ /* This function disables the FP for the currently executing thread. */ /* */ /* INPUT */ /* */ /* None */ /* */ /* OUTPUT */ /* */ /* None */ /* */ /* CALLS */ /* */ /* None */ /* */ /* CALLED BY */ /* */ /* Application Code */ /* */ /* RELEASE HISTORY */ /* */ /* DATE NAME DESCRIPTION */ /* */ /* 09-30-2020 William E. Lamie Initial Version 6.1 */ /* 01-31-2022 Andres Mlinar Updated comments, */ /* resulting in version 6.1.10 */ /* */ /**************************************************************************/ VOID _tx_thread_fp_disable(VOID) { TX_THREAD *thread_ptr; ULONG system_state; /* Pickup the current thread pointer. */ TX_THREAD_GET_CURRENT(thread_ptr); /* Get the system state. */ system_state = TX_THREAD_GET_SYSTEM_STATE(); /* Make sure it is not NULL. */ if (thread_ptr != TX_NULL) { /* Thread is running... make sure the call is from the thread context. */ if (system_state == 0) { /* Yes, now set the FP enable flag to false in the TX_THREAD structure. */ thread_ptr -> tx_thread_fp_enable = TX_FALSE; } } }