/* * Copyright (c) 2020 Elvees (support@elvees.com) * $Id: $ * $Name: Dmitry Evtushenko $ */ #ifndef __mem_h #define __mem_h #ifdef __FREERTOS__ #define GFP_DMA 0 #endif //__FREERTOS__ #ifdef __linux__ #define KMALLOC( qnt, size, flags) \ kmalloc( qnt, size, flags) #elif defined(__FREERTOS__) #define KMALLOC( qnt, size, flags) \ pvPortMalloc( qnt * size) #endif #ifdef __linux__ #define KCALLOC( qnt, size, flags) \ kcalloc( qnt, size, flags) #elif defined(__FREERTOS__) #define KCALLOC( qnt, size, flags) \ pvPortCalloc( qnt, size) #endif #ifdef __linux__ #define KFREE( pm) \ kfree( pm) #elif defined(__FREERTOS__) #define KFREE( pm) \ vPortFree( pm) #endif #endif //__mem_h