GCC Code Coverage Report
Directory: ./ Exec Total Coverage
File: core/src/ux_utility_event_flags_get.c Lines: 4 4 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
/**   Utility                                                             */
19
/**                                                                       */
20
/**************************************************************************/
21
/**************************************************************************/
22
23
24
/* Include necessary system files.  */
25
26
#define UX_SOURCE_CODE
27
28
#include "ux_api.h"
29
30
31
#if !defined(UX_STANDALONE)
32
/**************************************************************************/
33
/*                                                                        */
34
/*  FUNCTION                                               RELEASE        */
35
/*                                                                        */
36
/*    _ux_utility_event_flags_get                         PORTABLE C      */
37
/*                                                           6.1.11       */
38
/*  AUTHOR                                                                */
39
/*                                                                        */
40
/*    Chaoqiong Xiao, Microsoft Corporation                               */
41
/*                                                                        */
42
/*  DESCRIPTION                                                           */
43
/*                                                                        */
44
/*    This function get event flags from event flag group                 */
45
/*                                                                        */
46
/*  INPUT                                                                 */
47
/*                                                                        */
48
/*    group_ptr                             Event flag control group      */
49
/*    requested_flags                       32 bits variable event flags  */
50
/*    get_option                            AND/OR/CLEAR ... options      */
51
/*    actual_flag_ptr                       where the flags are placed    */
52
/*    wait_option                           waiting option                */
53
/*                                                                        */
54
/*                                                                        */
55
/*  OUTPUT                                                                */
56
/*                                                                        */
57
/*    Completion Status                                                   */
58
/*                                                                        */
59
/*  CALLS                                                                 */
60
/*                                                                        */
61
/*    tx_event_flags_get                    ThreadX get event flag        */
62
/*                                                                        */
63
/*  CALLED BY                                                             */
64
/*                                                                        */
65
/*    USBX Components                                                     */
66
/*                                                                        */
67
/**************************************************************************/
68
1721
UINT  _ux_utility_event_flags_get(UX_EVENT_FLAGS_GROUP*group_ptr, ULONG requested_flags,
69
                                        UINT get_option, ULONG *actual_flags_ptr, ULONG wait_option)
70
{
71
72
UINT    status;
73
ULONG   local_actual_flags_ptr;
74
75
    /* Call ThreadX to get the event flags.  */
76
1721
    status =  tx_event_flags_get(group_ptr, requested_flags, get_option, &local_actual_flags_ptr, wait_option);
77
78
    /* Update the actual flags.  */
79
1533
    *actual_flags_ptr = local_actual_flags_ptr;
80
81
    /* Return completion status.  */
82
1533
    return(status);
83
}
84
#endif