xpmem: Support large page attachment

Change-Id: I4d672eee1c905160ece204d278f0afd9b6d7dc01
Refs: #1259
This commit is contained in:
Masamichi Takagi
2019-04-04 02:29:34 +00:00
committed by Ken Sato
parent 569dc33a9c
commit a8696d811d
35 changed files with 2394 additions and 104 deletions

28
test/issues/1259/util.h Normal file
View File

@@ -0,0 +1,28 @@
#ifndef __UTIL_H_INCLUDED__
#define __UTIL_H_INCLUDED__
#define CHKANDJUMP(cond, err, ...) do { \
if (cond) { \
printf(__VA_ARGS__); \
ret = err; \
goto out; \
} \
} while (0)
#define _OKNG(verb, jump, cond, fmt, args...) do { \
if (cond) { \
if (verb) \
printf("[ OK ] " fmt, ##args); \
} else { \
printf("[ NG ] " fmt, ##args); \
if (jump) \
goto out; \
} \
} while (0)
#define OKNG(args...) _OKNG(1, 1, ##args)
#define NG(args...) _OKNG(0, 1, ##args)
#define OKNGNOJUMP(args...) _OKNG(1, 0, ##args)
#endif