2015-12-03 21:30:38 +00:00
|
|
|
/* Unit test stubbed version of ioat_impl.h */
|
|
|
|
|
|
|
|
#ifndef __IOAT_IMPL_H__
|
|
|
|
#define __IOAT_IMPL_H__
|
|
|
|
|
|
|
|
#include <assert.h>
|
|
|
|
#include <pthread.h>
|
|
|
|
#include <stdint.h>
|
|
|
|
#include <stdio.h>
|
|
|
|
#include <stdlib.h>
|
|
|
|
|
2016-02-03 21:36:26 +00:00
|
|
|
struct spdk_pci_device;
|
|
|
|
|
2015-12-03 21:30:38 +00:00
|
|
|
static inline void *
|
2016-08-10 17:37:12 +00:00
|
|
|
ioat_zmalloc(size_t size, unsigned align, uint64_t *phys_addr)
|
2015-12-03 21:30:38 +00:00
|
|
|
{
|
|
|
|
return calloc(1, size);
|
|
|
|
}
|
|
|
|
|
|
|
|
#define ioat_noop() do { } while (0)
|
|
|
|
|
|
|
|
#define ioat_calloc(tag, num, size, align) calloc(num, size)
|
|
|
|
#define ioat_malloc(tag, size, align) malloc(size)
|
|
|
|
#define ioat_free(buf) free(buf)
|
|
|
|
#define ioat_vtophys(buf) (uint64_t)(buf)
|
|
|
|
#define ioat_delay_us(us) ioat_noop()
|
2016-02-03 19:57:51 +00:00
|
|
|
|
2015-12-03 21:30:38 +00:00
|
|
|
#endif /* __IOAT_IMPL_H__ */
|