/*************************************************************************** * Copyright (c) 2024 Microsoft Corporation * * This program and the accompanying materials are made available under the * terms of the MIT License which is available at * https://opensource.org/licenses/MIT. * * SPDX-License-Identifier: MIT **************************************************************************/ /**************************************************************************/ /**************************************************************************/ /** */ /** GUIX Component */ /** */ /** System Management (System) */ /** */ /**************************************************************************/ #define GX_SOURCE_CODE /* Include necessary system files. */ #include "gx_api.h" #include "gx_system.h" #include "gx_animation.h" /**************************************************************************/ /* */ /* FUNCTION RELEASE */ /* */ /* _gx_system_animation_free PORTABLE C */ /* 6.1 */ /* AUTHOR */ /* */ /* Kenneth Maxwell, Microsoft Corporation */ /* */ /* DESCRIPTION */ /* */ /* Return a free GX_ANIMATION block from the system pool. */ /* */ /* INPUT */ /* */ /* animation GX_ANIMATION pointer */ /* */ /* OUTPUT */ /* */ /* status Completion status */ /* */ /* CALLS */ /* */ /* _gx_system_lock lock system mutex */ /* _gx_system_unlock unlock system mutex */ /* */ /* CALLED BY */ /* */ /* GUIX Application */ /* GUIX Internal Code */ /* */ /* RELEASE HISTORY */ /* */ /* DATE NAME DESCRIPTION */ /* */ /* 05-19-2020 Kenneth Maxwell Initial Version 6.0 */ /* 09-30-2020 Kenneth Maxwell Modified comment(s), */ /* resulting in version 6.1 */ /* */ /**************************************************************************/ #if (GX_ANIMATION_POOL_SIZE > 0) UINT _gx_system_animation_free(GX_ANIMATION *animation) { GX_ENTER_CRITICAL animation -> gx_animation_status = 0; animation -> gx_animation_system_allocated = GX_FALSE; animation -> gx_animation_next = _gx_system_animation_free_list; _gx_system_animation_free_list = animation; GX_EXIT_CRITICAL return GX_SUCCESS; } #endif