diff options
Diffstat (limited to 'utility/rtos_compatibility_layers/posix/px_memory_release.c')
| -rw-r--r-- | utility/rtos_compatibility_layers/posix/px_memory_release.c | 29 |
1 files changed, 12 insertions, 17 deletions
diff --git a/utility/rtos_compatibility_layers/posix/px_memory_release.c b/utility/rtos_compatibility_layers/posix/px_memory_release.c index c071b97a..b028c47a 100644 --- a/utility/rtos_compatibility_layers/posix/px_memory_release.c +++ b/utility/rtos_compatibility_layers/posix/px_memory_release.c @@ -1,18 +1,19 @@ /*************************************************************************** - * Copyright (c) 2024 Microsoft Corporation - * + * Copyright (c) 2024 Microsoft Corporation + * Copyright (c) 2026-present Eclipse ThreadX contributors + * * This program and the accompanying materials are made available under the * terms of the MIT License which is available at * https://opensource.org/licenses/MIT. - * + * * SPDX-License-Identifier: MIT **************************************************************************/ /**************************************************************************/ /**************************************************************************/ -/** */ -/** POSIX wrapper for THREADX */ +/** */ +/** POSIX wrapper for THREADX */ /** */ /** */ /** */ @@ -58,22 +59,16 @@ /* */ /* POSIX internal code */ /* */ -/* RELEASE HISTORY */ -/* */ -/* DATE NAME DESCRIPTION */ -/* */ -/* 06-02-2021 William E. Lamie Initial Version 6.1.7 */ -/* */ /**************************************************************************/ VOID posix_memory_release(VOID * memory_ptr) { - /* Check if memory_ptr is part of the POSIX byte pool, - * if not just return */ - if (((CHAR *)memory_ptr >= - (CHAR *)&posix_heap_byte_pool.tx_byte_pool_start) || - ((CHAR *)memory_ptr <= - (CHAR *)posix_heap_byte_pool.tx_byte_pool_start + /* Check if memory_ptr is part of the POSIX byte pool, + * if not just return */ + if (((CHAR *)memory_ptr >= + (CHAR *)&posix_heap_byte_pool.tx_byte_pool_start) || + ((CHAR *)memory_ptr <= + (CHAR *)posix_heap_byte_pool.tx_byte_pool_start + posix_heap_byte_pool.tx_byte_pool_size)) { tx_byte_release(memory_ptr); } |
