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_BUFFER_FULL_NOTIFY_CALL_NOT_USED
25 /**************************************************************************/
26 /* */
27 /* FUNCTION RELEASE */
28 /* */
29 /* _tx_trace_buffer_full_notify PORTABLE C */
30 /* 6.1.10 */
31 /* AUTHOR */
32 /* */
33 /* Scott Larson, Microsoft Corporation */
34 /* */
35 /* DESCRIPTION */
36 /* */
37 /* This function sets up the application callback function that is */
38 /* called whenever the trace buffer becomes full. The application */
39 /* can then swap to a new trace buffer in order not to lose any */
40 /* events. */
41 /* */
42 /* INPUT */
43 /* */
44 /* full_buffer_callback Full trace buffer processing */
45 /* function */
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_buffer_full_notify(VOID (* full_buffer_callback)(VOID * buffer))69 UINT _tx_trace_buffer_full_notify(VOID (*full_buffer_callback)(VOID *buffer))
70 {
71
72 UINT return_value;
73
74 /* Call module manager dispatcher. */
75 return_value = (UINT) (_txm_module_kernel_call_dispatcher)(TXM_TRACE_BUFFER_FULL_NOTIFY_CALL, (ALIGN_TYPE) full_buffer_callback, 0, 0);
76
77 /* Return value to the caller. */
78 return(return_value);
79 }
80 #endif
81