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_TRACE_USER_EVENT_INSERT_CALL_NOT_USED
25 /**************************************************************************/
26 /* */
27 /* FUNCTION RELEASE */
28 /* */
29 /* _tx_trace_user_event_insert PORTABLE C */
30 /* 6.1.10 */
31 /* AUTHOR */
32 /* */
33 /* Scott Larson, Microsoft Corporation */
34 /* */
35 /* DESCRIPTION */
36 /* */
37 /* This function inserts a user-defined event into the trace buffer. */
38 /* */
39 /* INPUT */
40 /* */
41 /* event_id User Event ID */
42 /* info_field_1 First information field */
43 /* info_field_2 First information field */
44 /* info_field_3 First information field */
45 /* info_field_4 First information field */
46 /* */
47 /* OUTPUT */
48 /* */
49 /* Completion Status */
50 /* */
51 /* CALLS */
52 /* */
53 /* _txm_module_kernel_call_dispatcher */
54 /* */
55 /* CALLED BY */
56 /* */
57 /* Module application code */
58 /* */
59 /* RELEASE HISTORY */
60 /* */
61 /* DATE NAME DESCRIPTION */
62 /* */
63 /* 09-30-2020 Scott Larson Initial Version 6.1 */
64 /* 01-31-2022 Scott Larson Modified comments and added */
65 /* CALL_NOT_USED option, */
66 /* resulting in version 6.1.10 */
67 /* */
68 /**************************************************************************/
_tx_trace_user_event_insert(ULONG event_id,ULONG info_field_1,ULONG info_field_2,ULONG info_field_3,ULONG info_field_4)69 UINT _tx_trace_user_event_insert(ULONG event_id, ULONG info_field_1, ULONG info_field_2, ULONG info_field_3, ULONG info_field_4)
70 {
71
72 UINT return_value;
73 ALIGN_TYPE extra_parameters[3];
74
75 extra_parameters[0] = (ALIGN_TYPE) info_field_2;
76 extra_parameters[1] = (ALIGN_TYPE) info_field_3;
77 extra_parameters[2] = (ALIGN_TYPE) info_field_4;
78
79 /* Call module manager dispatcher. */
80 return_value = (UINT) (_txm_module_kernel_call_dispatcher)(TXM_TRACE_USER_EVENT_INSERT_CALL, (ALIGN_TYPE) event_id, (ALIGN_TYPE) info_field_1, (ALIGN_TYPE) extra_parameters);
81
82 /* Return value to the caller. */
83 return(return_value);
84 }
85 #endif
86