2022-09-23 13:03:05 -03:00
|
|
|
|
|
|
|
#include <time.h>
|
2023-04-19 12:21:02 -03:00
|
|
|
#include <px4_log.h>
|
|
|
|
#include <qurt_alloc.h>
|
2022-09-23 13:03:05 -03:00
|
|
|
|
|
|
|
__attribute__((visibility("default"))) void free(void *ptr)
|
|
|
|
{
|
|
|
|
qurt_free(ptr);
|
2023-04-19 12:21:02 -03:00
|
|
|
ptr = 0;
|
2022-09-23 13:03:05 -03:00
|
|
|
}
|
|
|
|
|
|
|
|
__attribute__((visibility("default"))) void *malloc(size_t size)
|
|
|
|
{
|
2023-04-19 12:21:02 -03:00
|
|
|
return qurt_malloc(size);
|
2022-09-23 13:03:05 -03:00
|
|
|
}
|
|
|
|
|
|
|
|
__attribute__((visibility("default"))) void *calloc(size_t nmemb, size_t size)
|
|
|
|
{
|
2023-04-19 12:21:02 -03:00
|
|
|
PX4_ERR("Undefined calloc called");
|
2022-09-23 13:03:05 -03:00
|
|
|
return (void *) 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
__attribute__((visibility("default"))) void *realloc(void *ptr, size_t size)
|
|
|
|
{
|
2023-04-19 12:21:02 -03:00
|
|
|
PX4_ERR("Undefined realloc called");
|
2022-09-23 13:03:05 -03:00
|
|
|
return (void *) 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
__attribute__((visibility("default"))) int nanosleep(const struct timespec *req, struct timespec *rem)
|
|
|
|
{
|
2023-04-19 12:21:02 -03:00
|
|
|
PX4_ERR("Undefined nanosleep called");
|
2022-09-23 13:03:05 -03:00
|
|
|
return -1;
|
|
|
|
}
|