SOEM/osal/erika/osal_defs.h
Claudio Scordino 29df9ba013 Add ERIKA Enterprise RTOS support
This patch adds support to SOEM for the ERIKA Enterprise RTOS
(erika-enterprise.com).

Current requirements for running SOEM on ERIKA RTOS:
 - x86-64 platform with 2+ cores
 - Xen hypervisor
 - Intel i210 PCIe Ethernet controller

Signed-off-by: Claudio Scordino <claudio@evidence.eu.com>
Signed-off-by: Luca Cuomo <l.cuomo@evidence.eu.com>
2019-05-10 08:43:18 +02:00

42 lines
709 B
C

/*
* Licensed under the GNU General Public License version 2 with exceptions. See
* LICENSE file in the project root for full license information
*/
#ifndef _osal_defs_
#define _osal_defs_
#ifdef __cplusplus
extern "C"
{
#endif
#include <sys/time.h>
#include <stdlib.h>
#include <ee.h>
// define if debug print is needed
#define EC_DEBUG
#ifdef EC_DEBUG
#define EC_PRINT OSEE_PRINT
#else
#define EC_PRINT(...) do {} while (0)
#endif
#ifndef PACKED
#define PACKED_BEGIN
#define PACKED __attribute__((__packed__))
#define PACKED_END
#endif
int osal_gettimeofday(struct timeval *tv, struct timezone *tz);
void *osal_malloc(size_t size);
void osal_free(void *ptr);
#ifdef __cplusplus
}
#endif
#endif