Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions hal/common/retarget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -500,9 +500,11 @@ void mbed_stats_heap_get(mbed_stats_heap_t *stats)
#include "uvisor-lib/uvisor-lib.h"
#endif/* FEATURE_UVISOR */

#ifndef FEATURE_UVISOR
extern "C" {

/* uVisor wraps malloc_r, realloc_r and free_r, but not calloc_r! */
#ifndef FEATURE_UVISOR

extern "C" void __malloc_lock( struct _reent *_r );
extern "C" void __malloc_unlock( struct _reent *_r );

Expand Down Expand Up @@ -586,6 +588,9 @@ void __wrap__free_r(struct _reent * r, void * ptr) {
malloc_stats_mutex->unlock();
#endif
}

#endif/* FEATURE_UVISOR */

void* __wrap__calloc_r(struct _reent * r, size_t num, size_t size) {
#if !defined(MBED_HEAP_STATS_ENABLED ) || !MBED_HEAP_STATS_ENABLED
extern void* __real__calloc_r(struct _reent * r, size_t num, size_t size);
Expand All @@ -603,7 +608,6 @@ void* __wrap__calloc_r(struct _reent * r, size_t num, size_t size) {
#endif
}
}
#endif/* FEATURE_UVISOR */

extern "C" WEAK void software_init_hook_rtos(void)
{
Expand Down