esp-idf/components/esp_rom/include/esp32c2/rom/tlsf.h
Guillaume Souchere b8f682a11b esp-rom: create a patch of tlsf_check() for target(s) supporting ROM implementation of TLSF
The tlsf implementation in the ROM does not provide a mechanism
to register a callback to be called in by tlsf_check().

This commit is creating a patch of the tlsf implementation to provide
a definition of the function allowing to register the callback called
in tlsf_check() and add the call of this callback in tlsf_check().

This patch is only compiled for target(s) with ESP_ROM_HAS_HEAP_TLSF
set and ESP_ROM_TLSF_CHECK_PATCH set. For all the other configurations
the environment remains unchanged by those modifications.
2022-09-13 14:19:51 +02:00

33 lines
685 B
C

/*
* SPDX-FileCopyrightText: 2022 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
#pragma once
#ifdef __cplusplus
extern "C" {
#endif
/*!
* @brief Set the function to call for filling memory region when
* poisoning is configured.
*
* @param pfunc The callback function to trigger for poisoning
* a memory region.
*/
void tlsf_poison_fill_pfunc_set(void *pfunc);
/*!
* @brief Set the function to call for checking memory region when
* poisoning is configured.
*
* @param pfunc The callback function to trigger for checking
* the content of a memory region.
*/
void tlsf_poison_check_pfunc_set(void *pfunc);
#ifdef __cplusplus
}
#endif