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_BYTE_RELEASE_CALL_NOT_USED
25 /**************************************************************************/
26 /* */
27 /* FUNCTION RELEASE */
28 /* */
29 /* _txe_byte_release 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 release byte function call. */
38 /* */
39 /* INPUT */
40 /* */
41 /* memory_ptr Pointer to allocated memory */
42 /* */
43 /* OUTPUT */
44 /* */
45 /* TX_PTR_ERROR Invalid memory pointer */
46 /* TX_CALLER_ERROR Invalid caller of this function */
47 /* status Actual completion status */
48 /* */
49 /* CALLS */
50 /* */
51 /* _txm_module_kernel_call_dispatcher */
52 /* */
53 /* CALLED BY */
54 /* */
55 /* Module application code */
56 /* */
57 /* RELEASE HISTORY */
58 /* */
59 /* DATE NAME DESCRIPTION */
60 /* */
61 /* 09-30-2020 Scott Larson Initial Version 6.1 */
62 /* 01-31-2022 Scott Larson Modified comments and added */
63 /* CALL_NOT_USED option, */
64 /* resulting in version 6.1.10 */
65 /* */
66 /**************************************************************************/
_txe_byte_release(VOID * memory_ptr)67 UINT _txe_byte_release(VOID *memory_ptr)
68 {
69
70 UINT return_value;
71
72 /* Call module manager dispatcher. */
73 return_value = (UINT) (_txm_module_kernel_call_dispatcher)(TXM_BYTE_RELEASE_CALL, (ALIGN_TYPE) memory_ptr, 0, 0);
74
75 /* Return value to the caller. */
76 return(return_value);
77 }
78 #endif
79