1 /***************************************************************************
2 * Copyright (c) 2024 Microsoft Corporation
3 *
4 * This program and the accompanying materials are made available under the
5 * terms of the MIT License which is available at
6 * https://opensource.org/licenses/MIT.
7 *
8 * SPDX-License-Identifier: MIT
9 **************************************************************************/
10
11
12 /**************************************************************************/
13 /**************************************************************************/
14 /** */
15 /** ThreadX Component */
16 /** */
17 /** Module */
18 /** */
19 /**************************************************************************/
20 /**************************************************************************/
21
22 #define TXM_MODULE
23 #include "txm_module.h"
24 #ifndef TXM_EVENT_FLAGS_INFO_GET_CALL_NOT_USED
25 /**************************************************************************/
26 /* */
27 /* FUNCTION RELEASE */
28 /* */
29 /* _txe_event_flags_info_get PORTABLE C */
30 /* 6.1.10 */
31 /* AUTHOR */
32 /* */
33 /* Scott Larson, Microsoft Corporation */
34 /* */
35 /* DESCRIPTION */
36 /* */
37 /* This function checks for errors in the event flag information get */
38 /* service. */
39 /* */
40 /* INPUT */
41 /* */
42 /* group_ptr Pointer to event flag group */
43 /* name Destination for the event flags */
44 /* group name */
45 /* current_flags Current event flags */
46 /* first_suspended Destination for pointer of first */
47 /* thread suspended on event flags */
48 /* suspended_count Destination for suspended count */
49 /* next_group Destination for pointer to next */
50 /* event flag group on the created */
51 /* list */
52 /* */
53 /* OUTPUT */
54 /* */
55 /* TX_GROUP_ERROR Invalid event flag group pointer */
56 /* status Completion status */
57 /* */
58 /* CALLS */
59 /* */
60 /* _txm_module_kernel_call_dispatcher */
61 /* */
62 /* CALLED BY */
63 /* */
64 /* Module application code */
65 /* */
66 /* RELEASE HISTORY */
67 /* */
68 /* DATE NAME DESCRIPTION */
69 /* */
70 /* 09-30-2020 Scott Larson Initial Version 6.1 */
71 /* 01-31-2022 Scott Larson Modified comments and added */
72 /* CALL_NOT_USED option, */
73 /* resulting in version 6.1.10 */
74 /* */
75 /**************************************************************************/
_txe_event_flags_info_get(TX_EVENT_FLAGS_GROUP * group_ptr,CHAR ** name,ULONG * current_flags,TX_THREAD ** first_suspended,ULONG * suspended_count,TX_EVENT_FLAGS_GROUP ** next_group)76 UINT _txe_event_flags_info_get(TX_EVENT_FLAGS_GROUP *group_ptr, CHAR **name, ULONG *current_flags, TX_THREAD **first_suspended, ULONG *suspended_count, TX_EVENT_FLAGS_GROUP **next_group)
77 {
78
79 UINT return_value;
80 ALIGN_TYPE extra_parameters[4];
81
82 extra_parameters[0] = (ALIGN_TYPE) current_flags;
83 extra_parameters[1] = (ALIGN_TYPE) first_suspended;
84 extra_parameters[2] = (ALIGN_TYPE) suspended_count;
85 extra_parameters[3] = (ALIGN_TYPE) next_group;
86
87 /* Call module manager dispatcher. */
88 return_value = (UINT) (_txm_module_kernel_call_dispatcher)(TXM_EVENT_FLAGS_INFO_GET_CALL, (ALIGN_TYPE) group_ptr, (ALIGN_TYPE) name, (ALIGN_TYPE) extra_parameters);
89
90 /* Return value to the caller. */
91 return(return_value);
92 }
93 #endif
94