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 /** NetX Component                                                        */
15 /**                                                                       */
16 /**   Trace                                                               */
17 /**                                                                       */
18 /**************************************************************************/
19 /**************************************************************************/
20 
21 #ifndef NX_SOURCE_CODE
22 #define NX_SOURCE_CODE
23 #endif
24 
25 /* Include necessary system files.  */
26 
27 #include "nx_api.h"
28 
29 
30 #ifdef TX_ENABLE_EVENT_TRACE
31 extern VOID _tx_trace_object_unregister(VOID *);
32 /**************************************************************************/
33 /*                                                                        */
34 /*  FUNCTION                                               RELEASE        */
35 /*                                                                        */
36 /*    _nx_trace_object_unregister                         PORTABLE C      */
37 /*                                                           6.1          */
38 /*  AUTHOR                                                                */
39 /*                                                                        */
40 /*    Yuxin Zhou, Microsoft Corporation                                   */
41 /*                                                                        */
42 /*  DESCRIPTION                                                           */
43 /*                                                                        */
44 /*    This function unregisters a NetX Duo object in the trace registry.  */
45 /*                                                                        */
46 /*  INPUT                                                                 */
47 /*                                                                        */
48 /*    object_pointer                        Address of system object      */
49 /*                                                                        */
50 /*  OUTPUT                                                                */
51 /*                                                                        */
52 /*    None                                                                */
53 /*                                                                        */
54 /*  CALLS                                                                 */
55 /*                                                                        */
56 /*    _tx_trace_object_unregister           Actual unregister function    */
57 /*                                                                        */
58 /*  CALLED BY                                                             */
59 /*                                                                        */
60 /*    NetX Duo delete functions                                           */
61 /*                                                                        */
62 /*  RELEASE HISTORY                                                       */
63 /*                                                                        */
64 /*    DATE              NAME                      DESCRIPTION             */
65 /*                                                                        */
66 /*  05-19-2020     Yuxin Zhou               Initial Version 6.0           */
67 /*  09-30-2020     Yuxin Zhou               Modified comment(s),          */
68 /*                                            resulting in version 6.1    */
69 /*                                                                        */
70 /**************************************************************************/
_nx_trace_object_unregister(VOID * object_ptr)71 VOID  _nx_trace_object_unregister(VOID *object_ptr)
72 {
73 
74 TX_INTERRUPT_SAVE_AREA
75 
76 
77     /* Disable interrupts.  */
78     TX_DISABLE
79 
80     /* Call actual object unregister function.  */
81     _tx_trace_object_unregister(object_ptr);
82 
83     /* Restore interrupts.  */
84     TX_RESTORE
85 }
86 #endif
87 
88