|
#define | HSTORE_VERSION ((uint32_t)0x00010000) |
|
#define | _HSTORE_LIKELY(x) __builtin_expect((x),1) |
|
#define | _HSTORE_UNLIKELY(x) __builtin_expect((x),0) |
|
#define | xchg __sync_lock_test_and_set |
|
#define | _HSTORE_STATE_UNBLOCKED 0 |
|
#define | _HSTORE_STATE_READER_WAITING 1 |
|
#define | _HSTORE_STATE_WRITER_WAITING 2 |
|
#define | _HSTORE_PAGE_STATE_TENTATIVE ((uint8_t)0) |
|
#define | _HSTORE_PAGE_STATE_CONT ((uint8_t)1) |
|
#define | _HSTORE_PAGE_STATE_COMMIT ((uint8_t)2) |
|
#define | _HSTORE_PAGE_STATE_ROLLBACK ((uint8_t)3) |
|
#define | _HSTORE_TYCTOR_PRIM ((int)0) |
|
#define | _HSTORE_TYCTOR_TVAR ((int)2) |
|
#define | _HSTORE_TYCTOR_FIXEDARR ((int)4) |
|
#define | _HSTORE_TYCTOR_ARR ((int)5) |
|
#define | _HSTORE_TYCTOR_VARIANT ((int)6) |
|
#define | _HSTORE_TYCTOR_STRUCT ((int)7) |
|
#define | _HSTORE_TYCTOR_SIZE ((int)11) |
|
#define | _HSTORE_TYCTOR_RECURSIVE ((int)13) |
|
#define | _HSTORE_DEFINE_PRIMTYS(T, n) |
|
#define | _HSTORE_FIRST(a, ...) a |
|
#define | _HSTORE_SECOND(a, b, ...) b |
|
#define | _HSTORE_JOIN(a, b) a ## b |
|
#define | _HSTORE_IS_NEGATE(...) _HSTORE_SECOND(__VA_ARGS__, 0) |
|
#define | _HSTORE_NOT(x) _HSTORE_IS_NEGATE(_HSTORE_JOIN(_HSTORE__NOT_, x)) |
|
#define | _HSTORE__NOT_0 NEGATE, 1 |
|
#define | _HSTORE_BOOL(x) _HSTORE_NOT(_HSTORE_NOT(x)) |
|
#define | _HSTORE_IF_ELSE(condition) _HSTORE__IF_ELSE(_HSTORE_BOOL(condition)) |
|
#define | _HSTORE__IF_ELSE(condition) _HSTORE_JOIN(_HSTORE__IF_, condition) |
|
#define | _HSTORE__IF_1(...) __VA_ARGS__ _HSTORE__IF_1_ELSE |
|
#define | _HSTORE__IF_0(...) _HSTORE__IF_0_ELSE |
|
#define | _HSTORE__IF_1_ELSE(...) |
|
#define | _HSTORE__IF_0_ELSE(...) __VA_ARGS__ |
|
#define | _HSTORE_EMPTY() |
|
#define | _HSTORE_EVAL(...) _HSTORE_EVAL256(__VA_ARGS__) |
|
#define | _HSTORE_EVAL256(...) _HSTORE_EVAL128(_HSTORE_EVAL128(__VA_ARGS__)) |
|
#define | _HSTORE_EVAL128(...) _HSTORE_EVAL64(_HSTORE_EVAL64(__VA_ARGS__)) |
|
#define | _HSTORE_EVAL64(...) _HSTORE_EVAL32(_HSTORE_EVAL32(__VA_ARGS__)) |
|
#define | _HSTORE_EVAL32(...) _HSTORE_EVAL16(_HSTORE_EVAL16(__VA_ARGS__)) |
|
#define | _HSTORE_EVAL16(...) _HSTORE_EVAL8(_HSTORE_EVAL8(__VA_ARGS__)) |
|
#define | _HSTORE_EVAL8(...) _HSTORE_EVAL4(_HSTORE_EVAL4(__VA_ARGS__)) |
|
#define | _HSTORE_EVAL4(...) _HSTORE_EVAL2(_HSTORE_EVAL2(__VA_ARGS__)) |
|
#define | _HSTORE_EVAL2(...) _HSTORE_EVAL1(_HSTORE_EVAL1(__VA_ARGS__)) |
|
#define | _HSTORE_EVAL1(...) __VA_ARGS__ |
|
#define | _HSTORE_DEFER2(m) m _HSTORE_EMPTY _HSTORE_EMPTY()() |
|
#define | _HSTORE_HAS_PARGS(...) _HSTORE_BOOL(_HSTORE_FIRST(_HSTORE__EOAP_ __VA_ARGS__)()) |
|
#define | _HSTORE__EOAP_(...) _HSTORE_BOOL(_HSTORE_FIRST(_HSTORE__EOA_ __VA_ARGS__)()) |
|
#define | _HSTORE__EOA_() 0 |
|
#define | _HSTORE_MAP(f, VS...) _HSTORE_EVAL(_HSTORE_MAPP(f, VS)) |
|
#define | _HSTORE_MAPP(f, H, T...) |
|
#define | _HSTORE__MAPP() _HSTORE_MAPP |
|
#define | HSTORE_FIELDC_SUCC(t, n) +1 |
|
#define | HSTORE_FIELD_COUNT(FIELDS...) (0 _HSTORE_MAP(HSTORE_FIELDC_SUCC, FIELDS)) |
|
#define | HSTORE_FIELDS_SUCC(t, n) +::hobbes::storage::store< t >::size(this-> n) |
|
#define | HSTORE_FIELD_SIZE(FIELDS...) (0 _HSTORE_MAP(HSTORE_FIELDS_SUCC, FIELDS)) |
|
#define | HSTORE_FIELDW_SUCC(t, n) &&::hobbes::storage::store< t >::write(p, this-> n) |
|
#define | HSTORE_FIELD_WRITES(FIELDS...) (true _HSTORE_MAP(HSTORE_FIELDW_SUCC, FIELDS)) |
|
#define | HSTORE_STRUCT_FIELD(t, n) t n; |
|
#define | HSTORE_STRUCT_FIELD_ENC(t, n) ::hobbes::storage::ws(#n, out); ::hobbes::storage::w((int)-1, out); ::hobbes::storage::store< t >::encode(out); |
|
#define | HSTORE_STRUCT_FIELD_DESC(t, n) + (", " #n " : " + ::hobbes::storage::store< t >::describe()) |
|
#define | DEFINE_PACKED_HSTORE_STRUCT(T, FIELDS...) |
|
#define | DEFINE_HSTORE_STRUCT(T, FIELDS...) |
|
#define | HSTORE_ENUM_CTOR_DEF(n) n , |
|
#define | HSTORE_ENUM_CTOR_CTOR(n) static const SelfT n() { return SelfT(SelfT::Enum::n); } |
|
#define | HSTORE_ENUM_CTORC_SUCC(n) +1 |
|
#define | HSTORE_ENUM_CTOR_STR(n) + "|" #n |
|
#define | HSTORE_ENUM_CTOR_ENCODE(n) |
|
#define | DEFINE_HSTORE_ENUM(T, CTORS...) |
|
#define | DEFINE_HSTORE_VARIANT_GEN(T, VDECL, VCTORS, VCOPY, VDESTROY, CTORCOUNT, VENCODE, VDESC, VSIZE, VWRITE, VVISITCASE, VEQCASE, CTAGS, CDATA) |
|
#define | HSTORE_VARIANT_CTOR(n, t) static SelfT n(const t & x) { SelfT r; r.tag = Enum::tag_##n; new (r.data) t(x); return r; } |
|
#define | HSTORE_VARIANT_CTOR_STR(n, t) + "," #n ":" + ::hobbes::storage::store< t >::describe() |
|
#define | HSTORE_VARIANT_CTOR_TAG(n, t) tag_##n, |
|
#define | HSTORE_VARIANT_SIZE_CASE(n, t) case Enum::tag_##n: return sizeof(int) + ::hobbes::storage::store< t >::size(this->n##_data); |
|
#define | HSTORE_VARIANT_WRITE_CASE(n, t) case Enum::tag_##n: return ::hobbes::storage::store<int>::write(p, (int)this->tag) && ::hobbes::storage::store< t >::write(p, this->n##_data); |
|
#define | HSTORE_VARIANT_PCOPY(n, t) case Enum::tag_##n: new (this->data) t(rhs.n##_data); break; |
|
#define | HSTORE_VARIANT_PDESTROY(n, t) case Enum::tag_##n: { typedef t __DT; ((__DT*)&this->n##_data)->~__DT(); } break; |
|
#define | HSTORE_VARIANT_SUCC(n, t) +1 |
|
#define | HSTORE_VARIANT_CTOR_OPAQUEDATA(n, t) t n##_data; |
|
#define | HSTORE_VARIANT_CTOR_ENCODE(n, t) |
|
#define | HSTORE_VARIANT_VDECL(n, t) virtual R n(const t & x) const = 0; |
|
#define | HSTORE_VARIANT_VCASE(n, t) case Enum::tag_##n: return v. n (this->n##_data); |
|
#define | HSTORE_VARIANT_EQCASE(n, t) case Enum::tag_##n: return (this->n##_data == rhs.n##_data); |
|
#define | DEFINE_HSTORE_VARIANT(T, CTORS...) DEFINE_HSTORE_VARIANT_GEN(T, _HSTORE_MAP(HSTORE_VARIANT_VDECL, CTORS), _HSTORE_MAP(HSTORE_VARIANT_CTOR, CTORS), _HSTORE_MAP(HSTORE_VARIANT_PCOPY, CTORS), _HSTORE_MAP(HSTORE_VARIANT_PDESTROY, CTORS), _HSTORE_MAP(HSTORE_VARIANT_SUCC, CTORS), _HSTORE_MAP(HSTORE_VARIANT_CTOR_ENCODE, CTORS), _HSTORE_MAP(HSTORE_VARIANT_CTOR_STR, CTORS), _HSTORE_MAP(HSTORE_VARIANT_SIZE_CASE, CTORS), _HSTORE_MAP(HSTORE_VARIANT_WRITE_CASE, CTORS), _HSTORE_MAP(HSTORE_VARIANT_VCASE, CTORS), _HSTORE_MAP(HSTORE_VARIANT_EQCASE, CTORS), _HSTORE_MAP(HSTORE_VARIANT_CTOR_TAG, CTORS), _HSTORE_MAP(HSTORE_VARIANT_CTOR_OPAQUEDATA, CTORS)) |
|
#define | HSTORE_VARIANT_LBL_CTOR(n, lbl, t) static SelfT n(const t & x) { SelfT r; r.tag = Enum::tag_##n; new (r.data) t(x); return r; } |
|
#define | HSTORE_VARIANT_LBL_CTOR_STR(n, lbl, t) + "," #n ":" + ::hobbes::storage::store< t >::describe() |
|
#define | HSTORE_VARIANT_LBL_CTOR_TAG(n, lbl, t) tag_##n, |
|
#define | HSTORE_VARIANT_LBL_SIZE_CASE(n, lbl, t) case Enum::tag_##n: return sizeof(int) + ::hobbes::storage::store< t >::size(this->n##_data); |
|
#define | HSTORE_VARIANT_LBL_WRITE_CASE(n, lbl, t) case Enum::tag_##n: return ::hobbes::storage::store<int>::write(p, (int)this->tag) && ::hobbes::storage::store< t >::write(p, this->n##_data); |
|
#define | HSTORE_VARIANT_LBL_PCOPY(n, lbl, t) case Enum::tag_##n: new (this->data) t(rhs.n##_data); break; |
|
#define | HSTORE_VARIANT_LBL_PDESTROY(n, lbl, t) case Enum::tag_##n: { typedef t __DT; ((__DT*)&this->n##_data)->~__DT(); } break; |
|
#define | HSTORE_VARIANT_LBL_SUCC(n, lbl, t) +1 |
|
#define | HSTORE_VARIANT_LBL_CTOR_OPAQUEDATA(n, lbl, t) t n##_data; |
|
#define | HSTORE_VARIANT_LBL_CTOR_ENCODE(n, lbl, t) |
|
#define | HSTORE_VARIANT_LBL_VDECL(n, lbl, t) virtual R n(const t & x) const = 0; |
|
#define | HSTORE_VARIANT_LBL_VCASE(n, lbl, t) case Enum::tag_##n: return v. n (this->n##_data); |
|
#define | HSTORE_VARIANT_LBL_EQCASE(n, lbl, t) case Enum::tag_##n: return (this->n##_data == rhs.n##_data); |
|
#define | DEFINE_HSTORE_VARIANT_WITH_LABELS(T, CTORS...) DEFINE_HSTORE_VARIANT_GEN(T, _HSTORE_MAP(HSTORE_VARIANT_LBL_VDECL, CTORS), _HSTORE_MAP(HSTORE_VARIANT_LBL_CTOR, CTORS), _HSTORE_MAP(HSTORE_VARIANT_LBL_PCOPY, CTORS), _HSTORE_MAP(HSTORE_VARIANT_LBL_PDESTROY, CTORS), _HSTORE_MAP(HSTORE_VARIANT_LBL_SUCC, CTORS), _HSTORE_MAP(HSTORE_VARIANT_LBL_CTOR_ENCODE, CTORS), _HSTORE_MAP(HSTORE_VARIANT_LBL_CTOR_STR, CTORS), _HSTORE_MAP(HSTORE_VARIANT_LBL_SIZE_CASE, CTORS), _HSTORE_MAP(HSTORE_VARIANT_LBL_WRITE_CASE, CTORS), _HSTORE_MAP(HSTORE_VARIANT_LBL_VCASE, CTORS), _HSTORE_MAP(HSTORE_VARIANT_LBL_EQCASE, CTORS), _HSTORE_MAP(HSTORE_VARIANT_LBL_CTOR_TAG, CTORS), _HSTORE_MAP(HSTORE_VARIANT_LBL_CTOR_OPAQUEDATA, CTORS)) |
|
#define | DEFINE_HSTORE_TYPE_ALIAS(_ATY, _REPTY) |
|
#define | _HSTORE_TSTR32(i, s) ::hobbes::storage::at8(i+(8*0),s),::hobbes::storage::at8(i+(8*1),s),::hobbes::storage::at8(i+(8*2),s),::hobbes::storage::at8(i+(8*3),s) |
|
#define | _HSTORE_TSTR128(i, s) _HSTORE_TSTR32(i+(32*0),s),_HSTORE_TSTR32(i+(32*1),s),_HSTORE_TSTR32(i+(32*2),s),_HSTORE_TSTR32(i+(32*3),s) |
|
#define | _HSTORE_TSTR512(i, s) _HSTORE_TSTR128(i+(128*0),s),_HSTORE_TSTR128(i+(128*1),s),_HSTORE_TSTR128(i+(128*2),s),_HSTORE_TSTR128(i+(128*3),s) |
|
#define | _HSTORE_TSTR1024(i, s) _HSTORE_TSTR512(i+(512*0),s),_HSTORE_TSTR512(i+(512*1),s) |
|
#define | _HSTORE_TSTR(s) ::hobbes::storage::strpack<_HSTORE_TSTR1024(0,s)> |
|
#define | DECLARE_STORAGE_GROUP(NAME, cm) extern ::hobbes::storage::StorageGroup<_HSTORE_TSTR(#NAME),cm> NAME |
|
#define | DEFINE_STORAGE_GROUP(NAME, pagec, qos, cm) ::hobbes::storage::StorageGroup<_HSTORE_TSTR(#NAME),cm> NAME = { 0, qos, pagec, -1 } |
|
#define | APPLY_HSTORE_STMT(GROUP, NAME, FLAGS, FMTSTR, ARGS...) ::hobbes::storage::write(&GROUP, ({static_assert(::hobbes::storage::maxVarRef(FMTSTR) <= decltype(::hobbes::storage::makePayloadTypes(ARGS))::count, "Log format string and payload arity mismatch"); ::hobbes::storage::StorageStatement<decltype(GROUP),&GROUP,_HSTORE_TSTR(__FILE__),__LINE__,_HSTORE_TSTR(#NAME),FLAGS,_HSTORE_TSTR(FMTSTR),decltype(::hobbes::storage::makePayloadTypes(ARGS))>::id;}), ## ARGS) |
|
#define | HSTORE(GROUP, NAME, ARGS...) APPLY_HSTORE_STMT(GROUP, NAME, 0, "", ## ARGS) |
|
#define | HLOG(GROUP, NAME, FMTSTR, ARGS...) APPLY_HSTORE_STMT(GROUP, NAME, 1, FMTSTR, ## ARGS) |
|
|
static long | hobbes::storage::sys_futex (volatile uint32_t *p, int op, int v, struct timespec *timeout, void *p2, int v2) |
|
static void | hobbes::storage::waitForUpdate (volatile uint32_t *p, int eqV) |
|
static void | hobbes::storage::wakeN (volatile uint32_t *p, int c) |
|
template<typename T > |
T | hobbes::storage::align (T x, T m) |
|
static void | hobbes::storage::uxchg (volatile uint32_t *px, uint32_t nx) |
|
void | hobbes::storage::mqwrite (int fd, const uint8_t *x, size_t len) |
|
int | hobbes::storage::mqconnect (const std::string &fileName) |
|
int | hobbes::storage::mqlisten (const std::string &fileName) |
|
std::string | hobbes::storage::tempDir () |
|
int | hobbes::storage::connectGroupHost (const std::string &groupName) |
|
int | hobbes::storage::makeGroupHost (const std::string &groupName) |
|
ProcThread | hobbes::storage::thisProcThread () |
|
std::string | hobbes::storage::sharedMemName (const std::string &groupName, const ProcThread &pt) |
|
std::string | hobbes::storage::sharedMemName (const std::string &groupName) |
|
void | hobbes::storage::registerSHMAlloc (int *mqserver, const std::string &groupName) |
|
QueueConnection | hobbes::storage::consumeQueue (const std::string &shmname) |
|
QueueConnection | hobbes::storage::consumeGroup (const std::string &gname, const ProcThread &pt) |
|
template<typename T > |
void | hobbes::storage::w (const T &x, bytes *out) |
|
void | hobbes::storage::ws (const char *x, bytes *out) |
|
void | hobbes::storage::ws (const std::string &x, bytes *out) |
|
void | hobbes::storage::ws (const bytes &x, bytes *out) |
|
void | hobbes::storage::encode_primty (const char *tn, bytes *out) |
|
| hobbes::storage::_HSTORE_DEFINE_PRIMTYS (bool, "bool") |
|
| hobbes::storage::_HSTORE_DEFINE_PRIMTYS (uint8_t, "byte") |
|
| hobbes::storage::_HSTORE_DEFINE_PRIMTYS (char, "char") |
|
| hobbes::storage::_HSTORE_DEFINE_PRIMTYS (int16_t, "short") |
|
| hobbes::storage::_HSTORE_DEFINE_PRIMTYS (uint16_t, "short") |
|
| hobbes::storage::_HSTORE_DEFINE_PRIMTYS (int32_t, "int") |
|
| hobbes::storage::_HSTORE_DEFINE_PRIMTYS (uint32_t, "int") |
|
| hobbes::storage::_HSTORE_DEFINE_PRIMTYS (int64_t, "long") |
|
| hobbes::storage::_HSTORE_DEFINE_PRIMTYS (uint64_t, "long") |
|
| hobbes::storage::_HSTORE_DEFINE_PRIMTYS (float, "float") |
|
| hobbes::storage::_HSTORE_DEFINE_PRIMTYS (double, "double") |
|
template<typename ... Ts> |
hstore_payload_types< Ts... > | hobbes::storage::makePayloadTypes (const Ts &...) |
|
template<typename TyList > |
void | hobbes::storage::makeTyDescF (bytes *e, std::string *d) |
|
template<size_t N> |
constexpr char | hobbes::storage::at (size_t i, const char(&s)[N]) |
|
template<size_t N> |
constexpr size_t | hobbes::storage::at8S (size_t i, size_t k, const char(&s)[N]) |
|
template<size_t N> |
constexpr size_t | hobbes::storage::at8 (size_t i, const char(&s)[N]) |
|
template<uint32_t * X> |
uint32_t | hobbes::storage::forceRegistration () |
|
template<typename GName , typename ... Ts> |
bool | hobbes::storage::write (StorageGroup< GName, AutoCommit > *g, uint32_t id, const Ts &... xs) |
|
template<typename GName , typename ... Ts> |
bool | hobbes::storage::write (StorageGroup< GName, ManualCommit > *g, uint32_t id, const Ts &... xs) |
|
template<size_t N> |
static constexpr size_t | hobbes::storage::readInt (const char(&fmt)[N], size_t i, size_t e, size_t n) |
|
static constexpr size_t | hobbes::storage::maxV (size_t x, size_t y) |
|
template<size_t N> |
static constexpr size_t | hobbes::storage::maxVarRefS (const char(&fmt)[N], size_t i, size_t s, size_t vri, size_t maxvr) |
|
template<size_t N> |
static constexpr size_t | hobbes::storage::maxVarRef (const char(&fmt)[N]) |
|
size_t | hobbes::storage::rs (const reader::MetaData &md, size_t o, size_t n, uint8_t *b) |
|
template<typename T > |
size_t | hobbes::storage::r (const reader::MetaData &md, size_t o, T *t) |
|
size_t | hobbes::storage::rs (const reader::MetaData &md, size_t o, std::string *s) |
|
size_t | hobbes::storage::rs (const reader::MetaData &md, size_t o, bytes *s) |
|
void | hobbes::storage::runReadProcess (const QueueConnection &qc, const std::function< std::function< void(Transaction &)>(PipeQOS, CommitMethod, const statements &)> &initF) |
|