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_MODULE_OBJECT_DEALLOCATE_CALL_NOT_USED
25 /**************************************************************************/
26 /*                                                                        */
27 /*  FUNCTION                                               RELEASE        */
28 /*                                                                        */
29 /*    _txm_module_manager_object_deallocate               PORTABLE C      */
30 /*                                                           6.1.10       */
31 /*  AUTHOR                                                                */
32 /*                                                                        */
33 /*    Scott Larson, Microsoft Corporation                                 */
34 /*                                                                        */
35 /*  DESCRIPTION                                                           */
36 /*                                                                        */
37 /*    This function deallocates a previously allocated object.            */
38 /*                                                                        */
39 /*  INPUT                                                                 */
40 /*                                                                        */
41 /*    object_ptr                        Object pointer to deallocate      */
42 /*                                                                        */
43 /*  OUTPUT                                                                */
44 /*                                                                        */
45 /*    status                            Completion status                 */
46 /*                                                                        */
47 /*  CALLS                                                                 */
48 /*                                                                        */
49 /*    _txm_module_kernel_call_dispatcher                                  */
50 /*                                                                        */
51 /*  CALLED BY                                                             */
52 /*                                                                        */
53 /*    Module application code                                             */
54 /*                                                                        */
55 /*  RELEASE HISTORY                                                       */
56 /*                                                                        */
57 /*    DATE              NAME                      DESCRIPTION             */
58 /*                                                                        */
59 /*  09-30-2020      Scott Larson            Initial Version 6.1           */
60 /*  01-31-2022      Scott Larson            Modified comments and added   */
61 /*                                            CALL_NOT_USED option,       */
62 /*                                            resulting in version 6.1.10 */
63 /*                                                                        */
64 /**************************************************************************/
_txm_module_object_deallocate(VOID * object_ptr)65 UINT _txm_module_object_deallocate(VOID *object_ptr)
66 {
67 
68 UINT return_value;
69 
70     /* Call module manager dispatcher.  */
71     return_value = (UINT) (_txm_module_kernel_call_dispatcher)(TXM_MODULE_OBJECT_DEALLOCATE_CALL, (ALIGN_TYPE) object_ptr, 0, 0);
72 
73     /* Return value to the caller.  */
74     return(return_value);
75 }
76 #endif
77