mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2024-12-01 09:24:10 +01:00
OP-943 inline pios_mem function have issues with simposix.
This commit is contained in:
parent
68de1e4d4d
commit
b3b90f1f66
@ -24,45 +24,13 @@
|
||||
* with this program; if not, write to the Free Software Foundation, Inc.,
|
||||
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
#ifndef PIOS_MEM_H
|
||||
#define PIOS_MEM_H
|
||||
#ifdef PIOS_TARGET_PROVIDES_FAST_HEAP
|
||||
// relies on pios_general_malloc to perform the allocation (i.e. pios_msheap.c)
|
||||
extern void *pios_general_malloc(size_t size, bool fastheap);
|
||||
|
||||
inline void *pios_fastheapmalloc(size_t size)
|
||||
{
|
||||
return pios_general_malloc(size, true);
|
||||
}
|
||||
void *pios_fastheapmalloc(size_t size);
|
||||
|
||||
void *pios_malloc(size_t size);
|
||||
|
||||
inline void *pios_malloc(size_t size)
|
||||
{
|
||||
return pios_general_malloc(size, false);
|
||||
}
|
||||
void pios_free(void *p);
|
||||
|
||||
inline void *pios_free(void *p)
|
||||
{
|
||||
vPortFree(p);
|
||||
}
|
||||
|
||||
#else
|
||||
// demand to pvPortMalloc implementation
|
||||
inline void *pios_fastheapmalloc(size_t size)
|
||||
{
|
||||
return pvPortMalloc(size);
|
||||
}
|
||||
|
||||
|
||||
inline void *pios_malloc(size_t size)
|
||||
{
|
||||
return pvPortMalloc(size);
|
||||
}
|
||||
|
||||
inline void *pios_free(void *p)
|
||||
{
|
||||
vPortFree(p);
|
||||
}
|
||||
#endif
|
||||
#endif /* PIOS_MEM_H */
|
||||
|
@ -39,6 +39,7 @@
|
||||
#include "queue.h"
|
||||
#include "semphr.h"
|
||||
#endif
|
||||
#include <pios_mem.h>
|
||||
|
||||
#ifdef PIOS_INCLUDE_TASK_MONITOR
|
||||
#ifndef PIOS_INCLUDE_FREERTOS
|
||||
|
@ -106,7 +106,7 @@ SRC += $(PIOSCORECOMMON)/pios_debuglog.c
|
||||
SRC += $(PIOSCORECOMMON)/pios_callbackscheduler.c
|
||||
SRC += $(PIOSCORECOMMON)/pios_deltatime.c
|
||||
SRC += $(PIOSCORECOMMON)/pios_notify.c
|
||||
|
||||
SRC += $(PIOSCORECOMMON)/pios_mem.c
|
||||
|
||||
## PIOS Hardware
|
||||
include $(PIOS)/posix/library.mk
|
||||
|
@ -100,6 +100,7 @@ SRC += $(PIOSCOMMON)/pios_usb_util.c
|
||||
SRC += $(PIOSCOMMON)/pios_task_monitor.c
|
||||
SRC += $(PIOSCOMMON)/pios_callbackscheduler.c
|
||||
SRC += $(PIOSCOMMON)/pios_notify.c
|
||||
SRC += $(PIOSCOMMON)/pios_mem.c
|
||||
## Misc library functions
|
||||
SRC += $(FLIGHTLIB)/fifo_buffer.c
|
||||
SRC += $(FLIGHTLIB)/sanitycheck.c
|
||||
|
Loading…
Reference in New Issue
Block a user