corda/src/common.h

30 lines
619 B
C
Raw Normal View History

#ifndef COMMON_H
#define COMMON_H
2007-06-05 00:28:52 +00:00
#include "stdint.h"
2007-06-18 04:25:42 +00:00
#include "stdlib.h"
#include "stdarg.h"
#include "string.h"
#include "stdio.h"
2007-06-05 00:28:52 +00:00
#define NO_RETURN __attribute__((noreturn))
#define LIKELY(v) __builtin_expect((v) != 0, true)
#define UNLIKELY(v) __builtin_expect((v) == 0, true)
2007-06-05 00:28:52 +00:00
#define MACRO_XY(X, Y) X##Y
#define MACRO_MakeNameXY(FX, LINE) MACRO_XY(FX, LINE)
#define MAKE_NAME(FX) MACRO_MakeNameXY(FX, __LINE__)
2007-06-20 04:26:36 +00:00
namespace vm {
typedef void* object;
const unsigned BytesPerWord = sizeof(uintptr_t);
const unsigned BitsPerWord = BytesPerWord * 8;
const unsigned LikelyPageSize = 4 * 1024;
}
#endif//COMMON_H