GCC Code Coverage Report
Directory: ./ Exec Total Coverage
File: core/src/ux_system_uninitialize.c Lines: 3 3 100.0 %
Date: 2026-03-06 18:57:10 Branches: 0 0 - %

Line Branch Exec Source
1
/***************************************************************************
2
 * Copyright (c) 2024 Microsoft Corporation
3
 * Copyright (c) 2026-present Eclipse ThreadX contributors
4
 *
5
 * This program and the accompanying materials are made available under the
6
 * terms of the MIT License which is available at
7
 * https://opensource.org/licenses/MIT.
8
 *
9
 * SPDX-License-Identifier: MIT
10
 **************************************************************************/
11
12
13
/**************************************************************************/
14
/**************************************************************************/
15
/**                                                                       */
16
/** USBX Component                                                        */
17
/**                                                                       */
18
/**   System                                                              */
19
/**                                                                       */
20
/**************************************************************************/
21
/**************************************************************************/
22
23
24
/* Include necessary system files.  */
25
26
#define UX_SOURCE_CODE
27
28
#include "ux_api.h"
29
#include "ux_system.h"
30
#include "ux_utility.h"
31
32
33
/**************************************************************************/
34
/*                                                                        */
35
/*  FUNCTION                                               RELEASE        */
36
/*                                                                        */
37
/*    _ux_system_uninitialize                             PORTABLE C      */
38
/*                                                           6.1.10       */
39
/*  AUTHOR                                                                */
40
/*                                                                        */
41
/*    Chaoqiong Xiao, Microsoft Corporation                               */
42
/*                                                                        */
43
/*  DESCRIPTION                                                           */
44
/*                                                                        */
45
/*    This function uninitializes the various control data structures for */
46
/*    the USBX system.                                                    */
47
/*                                                                        */
48
/*  INPUT                                                                 */
49
/*                                                                        */
50
/*  OUTPUT                                                                */
51
/*                                                                        */
52
/*    None                                                                */
53
/*                                                                        */
54
/*  CALLS                                                                 */
55
/*                                                                        */
56
/*    _ux_utility_mutex_delete                ThreadX delete mutex        */
57
/*                                                                        */
58
/*  CALLED BY                                                             */
59
/*                                                                        */
60
/*    Application                                                         */
61
/*                                                                        */
62
/**************************************************************************/
63
317
UINT  _ux_system_uninitialize(VOID)
64
{
65
66
#ifdef UX_ENABLE_DEBUG_LOG
67
68
    /* Free memory for debug log buffer.  */
69
    if ( _ux_system -> ux_system_debug_log_buffer != UX_NULL)
70
        _ux_utility_memory_free( _ux_system -> ux_system_debug_log_buffer);
71
#endif /* UX_ENABLE_DEBUG_LOG */
72
73
    /* Delete the Mutex object used by USBX to control critical sections.  */
74
317
    _ux_system_mutex_delete(&_ux_system -> ux_system_mutex);
75
76
317
    return(UX_SUCCESS);
77
}