nwaku/nimcache/release/wakubridge/@m..@s..@svendor@snim-chronicles@schronicles@stopics_registry.nim.c

245 lines
14 KiB
C

/* Generated by Nim Compiler v1.2.6 */
/* (c) 2020 Andreas Rumpf */
/* The generated code is subject to the original license. */
/* Compiled for: Linux, amd64, gcc */
/* Command for C compiler:
gcc -c -w -pthread -I/home/runner/work/nim-waku/nim-waku/vendor/nim-libbacktrace -I/home/runner/work/nim-waku/nim-waku/vendor/nim-libbacktrace/install/usr/include -I/home/runner/work/nim-waku/nim-waku/vendor/nim-secp256k1/secp256k1_wrapper -I/home/runner/work/nim-waku/nim-waku/vendor/nim-secp256k1/secp256k1_wrapper/secp256k1 -I/home/runner/work/nim-waku/nim-waku/vendor/nim-secp256k1/secp256k1_wrapper/secp256k1/src -DHAVE_CONFIG_H -DHAVE_BUILTIN_EXPECT -I/home/runner/work/nim-waku/nim-waku/vendor/nim-bearssl/bearssl/csources/src -I/home/runner/work/nim-waku/nim-waku/vendor/nim-bearssl/bearssl/csources/inc -I/home/runner/work/nim-waku/nim-waku/vendor/nim-bearssl/bearssl/csources/tools -DBR_USE_UNIX_TIME=1 -DBR_USE_URANDOM=1 -DBR_LE_UNALIGNED=1 -DBR_64=1 -DBR_amd64=1 -DBR_INT128=1 -I/home/runner/work/nim-waku/nim-waku/vendor/nim-nat-traversal/vendor/miniupnp/miniupnpc -I/home/runner/work/nim-waku/nim-waku/vendor/nim-nat-traversal/vendor/libnatpmp-upstream -DENABLE_STRNATPMPERR -march=native -g3 -Og -O3 -fno-strict-aliasing -fno-ident -I/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib -I/home/runner/work/nim-waku/nim-waku/waku/common -o nimcache/release/wakubridge/@m..@s..@svendor@snim-chronicles@schronicles@stopics_registry.nim.c.o nimcache/release/wakubridge/@m..@s..@svendor@snim-chronicles@schronicles@stopics_registry.nim.c */
#define NIM_INTBITS 64
#include "nimbase.h"
#include <sys/types.h>
#include <pthread.h>
#include <pthread.h>
#include <setjmp.h>
#undef LANGUAGE_C
#undef MIPSEB
#undef MIPSEL
#undef PPC
#undef R3000
#undef R4000
#undef i386
#undef linux
#undef mips
#undef near
#undef far
#undef powerpc
#undef unix
#define nimfr_(x, y)
#define nimln_(x, y)
typedef struct tyObject_Table__vbZjvjJSS3OgvMliUnJ8Jw tyObject_Table__vbZjvjJSS3OgvMliUnJ8Jw;
typedef struct tySequence__ni05SMuXu9cJdT0okaAgAUQ tySequence__ni05SMuXu9cJdT0okaAgAUQ;
typedef struct tyObject_TopicSettings__oHdFGV9aUkZXwZgwzeiU4oQ tyObject_TopicSettings__oHdFGV9aUkZXwZgwzeiU4oQ;
typedef struct TNimType TNimType;
typedef struct TNimNode TNimNode;
typedef struct Exception Exception;
typedef struct RootObj RootObj;
typedef struct NimStringDesc NimStringDesc;
typedef struct TGenericSeq TGenericSeq;
typedef struct tySequence__uB9b75OUPRENsBAu4AnoePA tySequence__uB9b75OUPRENsBAu4AnoePA;
typedef struct TSafePoint TSafePoint;
typedef struct tyTuple__sQx8Mjvg56usEKp7D4VZog tyTuple__sQx8Mjvg56usEKp7D4VZog;
typedef struct tyObject_StackTraceEntry__oLyohQ7O2XOvGnflOss8EA tyObject_StackTraceEntry__oLyohQ7O2XOvGnflOss8EA;
typedef long tyArray__xDUyu9aScDpt0JZLU6q9aEZQ[5];
typedef NU8 tyEnum_LogLevel__9bciZEQ8iC1G2PermjsuXmA;
struct tyObject_Table__vbZjvjJSS3OgvMliUnJ8Jw {tySequence__ni05SMuXu9cJdT0okaAgAUQ* data;
NI counter;
};
typedef NU8 tyEnum_TopicState__ah9cbicZo9clzGWtgai40l6g;
struct tyObject_TopicSettings__oHdFGV9aUkZXwZgwzeiU4oQ {tyEnum_TopicState__ah9cbicZo9clzGWtgai40l6g state;
tyEnum_LogLevel__9bciZEQ8iC1G2PermjsuXmA logLevel;
};
typedef NU8 tyEnum_TNimKind__jIBKr1ejBgsfM33Kxw4j7A;
typedef NU8 tySet_tyEnum_TNimTypeFlag__v8QUszD1sWlSIWZz7mC4bQ;
typedef N_NIMCALL_PTR(void, tyProc__ojoeKfW4VYIm36I9cpDTQIg) (void* p, NI op);
typedef N_NIMCALL_PTR(void*, tyProc__WSm2xU5ARYv9aAR4l0z9c9auQ) (void* p);
struct TNimType {NI size;
tyEnum_TNimKind__jIBKr1ejBgsfM33Kxw4j7A kind;
tySet_tyEnum_TNimTypeFlag__v8QUszD1sWlSIWZz7mC4bQ flags;
TNimType* base;
TNimNode* node;
void* finalizer;
tyProc__ojoeKfW4VYIm36I9cpDTQIg marker;
tyProc__WSm2xU5ARYv9aAR4l0z9c9auQ deepcopy;
NCSTRING name;
TNimType* nextType;
NI instances;
NI sizes;
};
typedef NU8 tyEnum_TNimNodeKind__unfNsxrcATrufDZmpBq4HQ;
struct TNimNode {tyEnum_TNimNodeKind__unfNsxrcATrufDZmpBq4HQ kind;
NI offset;
TNimType* typ;
NCSTRING name;
NI len;
TNimNode** sons;
};
typedef N_NIMCALL_PTR(void, tyProc__T4eqaYlFJYZUv9aG9b1TV0bQ) (void);
struct RootObj {TNimType* m_type;};
struct TGenericSeq {NI len;
NI reserved;
};
struct NimStringDesc { TGenericSeq Sup;NIM_CHAR data[SEQ_DECL_SIZE];
};
struct Exception { RootObj Sup;Exception* parent;
NCSTRING name;
NimStringDesc* message;
tySequence__uB9b75OUPRENsBAu4AnoePA* trace;
Exception* up;
};
typedef long tyArray__TcvIiMAJvcwzNLsZkfnFnQ[25];
struct TSafePoint {TSafePoint* prev;
NI status;
jmp_buf context;
};
struct tyTuple__sQx8Mjvg56usEKp7D4VZog {
NI Field0;
NimStringDesc* Field1;
tyObject_TopicSettings__oHdFGV9aUkZXwZgwzeiU4oQ* Field2;
};
struct tyObject_StackTraceEntry__oLyohQ7O2XOvGnflOss8EA {NCSTRING procname;
NI line;
NCSTRING filename;
};
struct tySequence__ni05SMuXu9cJdT0okaAgAUQ { TGenericSeq Sup; tyTuple__sQx8Mjvg56usEKp7D4VZog data[SEQ_DECL_SIZE];};struct tySequence__uB9b75OUPRENsBAu4AnoePA { TGenericSeq Sup; tyObject_StackTraceEntry__oLyohQ7O2XOvGnflOss8EA data[SEQ_DECL_SIZE];};N_LIB_PRIVATE N_NIMCALL(void, nimGCvisit)(void* d, NI op);
static N_NIMCALL(void, TM__dM2rEnlvIdkHVFPwSHZ1tw_6)(void);
N_LIB_PRIVATE N_NIMCALL(void, nimRegisterGlobalMarker)(tyProc__T4eqaYlFJYZUv9aG9b1TV0bQ markerProc);
N_LIB_PRIVATE N_NIMCALL(void, initTable__DVyIuDOweGk1P9bzznyI6QA)(NI initialSize, tyObject_Table__vbZjvjJSS3OgvMliUnJ8Jw* Result);
N_LIB_PRIVATE N_NIMCALL(NI, getThreadId__hrQB9bN29c1nR1E9cHqYcNcDA_2)(void);
static N_INLINE(void, initLock__Mz9ax9a7rBFxTQq0g0dLnxAwlocks)(pthread_mutex_t* lock);
N_LIB_PRIVATE N_NIMCALL(void, acquire__9bDG9bIkA6DtNcXVdL7bnLvg)(pthread_mutex_t* lock);
static N_INLINE(void, pushSafePoint)(TSafePoint* s);
static N_INLINE(void, popSafePoint)(void);
N_LIB_PRIVATE N_NIMCALL(void, release__9bDG9bIkA6DtNcXVdL7bnLvg_2)(pthread_mutex_t* lock);
N_LIB_PRIVATE N_NIMCALL(void, nimLeaveFinally)(void);
N_LIB_PRIVATE N_NIMCALL(void, reraiseException)(void);
N_LIB_PRIVATE TNimType NTI__oHdFGV9aUkZXwZgwzeiU4oQ_;
N_LIB_PRIVATE TNimType NTI__ah9cbicZo9clzGWtgai40l6g_;
extern TNimType NTI__9bciZEQ8iC1G2PermjsuXmA_;
N_LIB_PRIVATE TNimType NTI__lDH3teBMmRGDFALviSoHXQ_;
extern TNimType NTI__vbZjvjJSS3OgvMliUnJ8Jw_;
N_LIB_PRIVATE pthread_mutex_t registryLock__gSAJv26CP8tAWB2Sq9bsUxg;
N_LIB_PRIVATE tyEnum_LogLevel__9bciZEQ8iC1G2PermjsuXmA gActiveLogLevel__KW9cN1uQtAHIyj9an9a5Dd8Og;
N_LIB_PRIVATE NI gTotalEnabledTopics__wW89agTTxIAyafladxyi9c9cg;
N_LIB_PRIVATE NI gTotalRequiredTopics__HNDudEI7qS2OaTCT9bMXFJQ;
N_LIB_PRIVATE tyObject_Table__vbZjvjJSS3OgvMliUnJ8Jw gTopicStates__ZkKzPZlSOosesrao9apKwsg;
extern TNimType* nimTypeRoot;
N_LIB_PRIVATE NI mainThreadId__MjVTb4iPhYDjvyqFIGYWxw;
extern NIM_THREADVAR TSafePoint* excHandler__rqLlY5bs9atDw2OXYqJEn5g;
extern NIM_THREADVAR TSafePoint* excHandler__rqLlY5bs9atDw2OXYqJEn5g;
extern NIM_THREADVAR TSafePoint* excHandler__rqLlY5bs9atDw2OXYqJEn5g;
extern NIM_THREADVAR TSafePoint* excHandler__rqLlY5bs9atDw2OXYqJEn5g;
static N_NIMCALL(void, TM__dM2rEnlvIdkHVFPwSHZ1tw_6)(void) {
nimGCvisit((void*)gTopicStates__ZkKzPZlSOosesrao9apKwsg.data, 0);}
#line 27 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/core/locks.nim"
static N_INLINE(void, initLock__Mz9ax9a7rBFxTQq0g0dLnxAwlocks)(pthread_mutex_t* lock) {
#line 29 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/core/locks.nim"
#line 29 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/core/locks.nim"
pthread_mutex_init(lock, NIM_NIL);
}
#line 107 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/system/excpt.nim"
static N_INLINE(void, pushSafePoint)(TSafePoint* s) {
#line 108 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/system/excpt.nim"
(*s).prev = excHandler__rqLlY5bs9atDw2OXYqJEn5g;
#line 109 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/system/excpt.nim"
excHandler__rqLlY5bs9atDw2OXYqJEn5g = s;}
#line 111 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/system/excpt.nim"
static N_INLINE(void, popSafePoint)(void) {
#line 112 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/system/excpt.nim"
excHandler__rqLlY5bs9atDw2OXYqJEn5g = (*excHandler__rqLlY5bs9atDw2OXYqJEn5g).prev;}
#line 39 "/home/runner/work/nim-waku/nim-waku/vendor/nim-chronicles/chronicles/topics_registry.nim"
N_LIB_PRIVATE N_NIMCALL(void, setLogLevel__vpUFsLHhGOauIDBfdOMH6w)(tyEnum_LogLevel__9bciZEQ8iC1G2PermjsuXmA lvl) { TSafePoint TM__dM2rEnlvIdkHVFPwSHZ1tw_7;
#line 68 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/core/locks.nim"
#line 68 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/core/locks.nim"
acquire__9bDG9bIkA6DtNcXVdL7bnLvg((&registryLock__gSAJv26CP8tAWB2Sq9bsUxg));
#line 70 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/core/locks.nim"
pushSafePoint(&TM__dM2rEnlvIdkHVFPwSHZ1tw_7); TM__dM2rEnlvIdkHVFPwSHZ1tw_7.status = setjmp(TM__dM2rEnlvIdkHVFPwSHZ1tw_7.context); if (TM__dM2rEnlvIdkHVFPwSHZ1tw_7.status == 0) {
#line 41 "/home/runner/work/nim-waku/nim-waku/vendor/nim-chronicles/chronicles/topics_registry.nim"
gActiveLogLevel__KW9cN1uQtAHIyj9an9a5Dd8Og = lvl; popSafePoint(); }
else { popSafePoint(); }
{
#line 73 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/core/locks.nim"
#line 73 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/core/locks.nim"
release__9bDG9bIkA6DtNcXVdL7bnLvg_2((&registryLock__gSAJv26CP8tAWB2Sq9bsUxg));
if (TM__dM2rEnlvIdkHVFPwSHZ1tw_7.status != 0) nimLeaveFinally(); }
if (TM__dM2rEnlvIdkHVFPwSHZ1tw_7.status != 0) reraiseException();}
N_LIB_PRIVATE N_NIMCALL(void, chronicles_topics_registryInit000)(void) {
#line 999999 "generated_not_to_break_here"
{
nimRegisterGlobalMarker(TM__dM2rEnlvIdkHVFPwSHZ1tw_6);
#line 26 "/home/runner/work/nim-waku/nim-waku/vendor/nim-chronicles/chronicles/topics_registry.nim"
#line 26 "/home/runner/work/nim-waku/nim-waku/vendor/nim-chronicles/chronicles/topics_registry.nim"
initTable__DVyIuDOweGk1P9bzznyI6QA(((NI) 64), (&gTopicStates__ZkKzPZlSOosesrao9apKwsg));
#line 29 "/home/runner/work/nim-waku/nim-waku/vendor/nim-chronicles/chronicles/topics_registry.nim"
#line 29 "/home/runner/work/nim-waku/nim-waku/vendor/nim-chronicles/chronicles/topics_registry.nim"
mainThreadId__MjVTb4iPhYDjvyqFIGYWxw = getThreadId__hrQB9bN29c1nR1E9cHqYcNcDA_2();
#line 31 "/home/runner/work/nim-waku/nim-waku/vendor/nim-chronicles/chronicles/topics_registry.nim"
#line 31 "/home/runner/work/nim-waku/nim-waku/vendor/nim-chronicles/chronicles/topics_registry.nim"
initLock__Mz9ax9a7rBFxTQq0g0dLnxAwlocks((&registryLock__gSAJv26CP8tAWB2Sq9bsUxg));
}
}
N_LIB_PRIVATE N_NIMCALL(void, chronicles_topics_registryDatInit000)(void) {
#line 999999 "generated_not_to_break_here"
static TNimNode* TM__dM2rEnlvIdkHVFPwSHZ1tw_2_2[2];
static TNimNode* TM__dM2rEnlvIdkHVFPwSHZ1tw_3_4[4];
NI TM__dM2rEnlvIdkHVFPwSHZ1tw_5;
static char* NIM_CONST TM__dM2rEnlvIdkHVFPwSHZ1tw_4[4] = {
"Normal",
"Enabled",
"Required",
"Disabled"};
static TNimNode TM__dM2rEnlvIdkHVFPwSHZ1tw_0[8];NTI__oHdFGV9aUkZXwZgwzeiU4oQ_.size = sizeof(tyObject_TopicSettings__oHdFGV9aUkZXwZgwzeiU4oQ);
NTI__oHdFGV9aUkZXwZgwzeiU4oQ_.kind = 18;
NTI__oHdFGV9aUkZXwZgwzeiU4oQ_.base = 0;
NTI__oHdFGV9aUkZXwZgwzeiU4oQ_.flags = 3;
NTI__oHdFGV9aUkZXwZgwzeiU4oQ_.name = "TopicSettings";
NTI__oHdFGV9aUkZXwZgwzeiU4oQ_.nextType = nimTypeRoot; nimTypeRoot=&NTI__oHdFGV9aUkZXwZgwzeiU4oQ_;
TM__dM2rEnlvIdkHVFPwSHZ1tw_2_2[0] = &TM__dM2rEnlvIdkHVFPwSHZ1tw_0[1];
NTI__ah9cbicZo9clzGWtgai40l6g_.size = sizeof(tyEnum_TopicState__ah9cbicZo9clzGWtgai40l6g);
NTI__ah9cbicZo9clzGWtgai40l6g_.kind = 14;
NTI__ah9cbicZo9clzGWtgai40l6g_.base = 0;
NTI__ah9cbicZo9clzGWtgai40l6g_.flags = 3;
NTI__ah9cbicZo9clzGWtgai40l6g_.name = "TopicState";
NTI__ah9cbicZo9clzGWtgai40l6g_.nextType = nimTypeRoot; nimTypeRoot=&NTI__ah9cbicZo9clzGWtgai40l6g_;
for (TM__dM2rEnlvIdkHVFPwSHZ1tw_5 = 0; TM__dM2rEnlvIdkHVFPwSHZ1tw_5 < 4; TM__dM2rEnlvIdkHVFPwSHZ1tw_5++) {
TM__dM2rEnlvIdkHVFPwSHZ1tw_0[TM__dM2rEnlvIdkHVFPwSHZ1tw_5+2].kind = 1;
TM__dM2rEnlvIdkHVFPwSHZ1tw_0[TM__dM2rEnlvIdkHVFPwSHZ1tw_5+2].offset = TM__dM2rEnlvIdkHVFPwSHZ1tw_5;
TM__dM2rEnlvIdkHVFPwSHZ1tw_0[TM__dM2rEnlvIdkHVFPwSHZ1tw_5+2].name = TM__dM2rEnlvIdkHVFPwSHZ1tw_4[TM__dM2rEnlvIdkHVFPwSHZ1tw_5];
TM__dM2rEnlvIdkHVFPwSHZ1tw_3_4[TM__dM2rEnlvIdkHVFPwSHZ1tw_5] = &TM__dM2rEnlvIdkHVFPwSHZ1tw_0[TM__dM2rEnlvIdkHVFPwSHZ1tw_5+2];
}
TM__dM2rEnlvIdkHVFPwSHZ1tw_0[6].len = 4; TM__dM2rEnlvIdkHVFPwSHZ1tw_0[6].kind = 2; TM__dM2rEnlvIdkHVFPwSHZ1tw_0[6].sons = &TM__dM2rEnlvIdkHVFPwSHZ1tw_3_4[0];
NTI__ah9cbicZo9clzGWtgai40l6g_.node = &TM__dM2rEnlvIdkHVFPwSHZ1tw_0[6];
TM__dM2rEnlvIdkHVFPwSHZ1tw_0[1].kind = 1;
TM__dM2rEnlvIdkHVFPwSHZ1tw_0[1].offset = offsetof(tyObject_TopicSettings__oHdFGV9aUkZXwZgwzeiU4oQ, state);
TM__dM2rEnlvIdkHVFPwSHZ1tw_0[1].typ = (&NTI__ah9cbicZo9clzGWtgai40l6g_);
TM__dM2rEnlvIdkHVFPwSHZ1tw_0[1].name = "state";
TM__dM2rEnlvIdkHVFPwSHZ1tw_2_2[1] = &TM__dM2rEnlvIdkHVFPwSHZ1tw_0[7];
TM__dM2rEnlvIdkHVFPwSHZ1tw_0[7].kind = 1;
TM__dM2rEnlvIdkHVFPwSHZ1tw_0[7].offset = offsetof(tyObject_TopicSettings__oHdFGV9aUkZXwZgwzeiU4oQ, logLevel);
TM__dM2rEnlvIdkHVFPwSHZ1tw_0[7].typ = (&NTI__9bciZEQ8iC1G2PermjsuXmA_);
TM__dM2rEnlvIdkHVFPwSHZ1tw_0[7].name = "logLevel";
TM__dM2rEnlvIdkHVFPwSHZ1tw_0[0].len = 2; TM__dM2rEnlvIdkHVFPwSHZ1tw_0[0].kind = 2; TM__dM2rEnlvIdkHVFPwSHZ1tw_0[0].sons = &TM__dM2rEnlvIdkHVFPwSHZ1tw_2_2[0];
NTI__oHdFGV9aUkZXwZgwzeiU4oQ_.node = &TM__dM2rEnlvIdkHVFPwSHZ1tw_0[0];
NTI__lDH3teBMmRGDFALviSoHXQ_.size = sizeof(tyObject_TopicSettings__oHdFGV9aUkZXwZgwzeiU4oQ*);
NTI__lDH3teBMmRGDFALviSoHXQ_.kind = 21;
NTI__lDH3teBMmRGDFALviSoHXQ_.base = (&NTI__oHdFGV9aUkZXwZgwzeiU4oQ_);
NTI__lDH3teBMmRGDFALviSoHXQ_.flags = 3;
NTI__lDH3teBMmRGDFALviSoHXQ_.name = "ptr TopicSettings";
NTI__lDH3teBMmRGDFALviSoHXQ_.nextType = nimTypeRoot; nimTypeRoot=&NTI__lDH3teBMmRGDFALviSoHXQ_;
}