155#ifndef META_HAS_THREAD
156 #error "META_HAS_THREAD was NOT defined, require 1 or 0, forget to include 'theKernel/c/compiler.mk' ?"
206#define META_TIMEOUT_REF 900
213#define META_HDL_USE__NONNULL__GCC_ATTRIBUTE 0
222#if !defined(META_ATTRIBUTE_SANITIZE)
223# define META_ATTRIBUTE_SANITIZE __attribute__((no_sanitize("address")))
265#ifndef META_DOXYGEN_USE_C_PRIVAT
266# ifdef META_DOXYGEN_SHOULD_SKIP_THIS
267# define META_DOXYGEN_USE_C_PRIVAT 0
269# define META_DOXYGEN_USE_C_PRIVAT 1
280# undef MK_C_BUILD_DLL
281# define MK_C_BUILD_DLL
282# undef META_IGNORE_EXTERN
283# define META_IGNORE_EXTERN
292#define META_DEBUG_ALL -1
293#define META_DEBUG_DEFAULT (1<<1)
294#define META_DEBUG_CACHE (1<<2)
295#define META_DEBUG_TYPE (1<<3)
303#define META_DEBUG_SOCKET (1<<4)
304#define META_DEBUG_EVENT (1<<5)
305#define META_DEBUG_MEM (1<<6)
312#define META_DEBUG_REFCOUNT (1<<7)
313#define META_DEBUG_ERROR (1<<8)
319#if META_DEBUG & META_DEBUG_TYPE
320# define META_DEBUG_TYPE__printV(...) printV(__VA_ARGS__)
322# define META_DEBUG_TYPE__printV(...)
326#if META_DEBUG & META_DEBUG_ERROR
327# define META_DEBUG_ERROR_check() META_DEBUG_ERROR_checkO(NULL)
328# define META_DEBUG_ERROR_checkX(x) META_DEBUG_ERROR_checkO(MkOBJ(x))
329# define META_DEBUG_ERROR_checkO(o) if (MkErrorCheckE_0E()) MkDbgError_RT(MK_RT_CALL o, __func__);
331# define META_DEBUG_ERROR_check()
332# define META_DEBUG_ERROR_checkX(x)
333# define META_DEBUG_ERROR_checkO(o)
336#if !defined(PARSE_C_HEADER_TO_META) && META_DEBUG
337# include "debug_mk.h"
342#if defined(META_DISABLE_LOG)
343 # define MkDCheck(_debug)
344 # define MkDLogC(x,_debug,str)
345 # define MkDLogV(x,_debug,printfmt,...)
346 # define MkDProtect(_debug) if (MK_RT_REF.debug < _debug) return
347 # define MkDProtect2(_debug,_call) if (MK_RT_REF.debug < _debug) return
350 # define MkDDInit const MK_I32 __dbg = MK_RT_REF.debug
351 # define MkDDInitNum(n) const MK_I32 __dbg = n
356# define MkDCheck(_debug) if (unlikely(MK_RT_REF.debug >= _debug))
357# define MkDDCheck(_debug) if (unlikely(__dbg >= _debug))
365# define MkDLogC_O(fmtobj,_debug,str) \
366 if (unlikely(MK_RT_REF.debug >= _debug)) MkLogC(fmtobj,str,_debug,__func__)
368# define MkDLogC(x,_debug,str) MkDLogC_O(MkOBJ(x),_debug,str)
370# define MkDDLogC(x,_debug,str) \
371 if (unlikely(__dbg >= _debug)) MkLogC_4X(x,str,_debug,__func__)
380# define MkDLogV_O(fmtobj,_debug,printfmt,...) \
381 if (unlikely(MK_RT_REF.debug >= _debug)) MkLogV(fmtobj,__func__,_debug,printfmt,__VA_ARGS__)
383# define MkDLogV(x,_debug,printfmt,...) MkDLogV_O(MkOBJ(x),_debug,printfmt,__VA_ARGS__)
385# define MkDDLogV(fmtobj,_debug,printfmt,...) \
386 if (unlikely(__dbg >= _debug)) MkLogV_4M(fmtobj,__func__,_debug,printfmt,__VA_ARGS__)
389 # define MkDProtect(_debug) if (MK_RT_REF.debug < _debug) { \
390 MkLogV_2(fmtobj,MK_COLOR_ORANGE "Warning: ignore call to '%s' with '%d'" MK_COLOR_RESET "\n", __func__, debug); \
391 printSTACK_1(fmtobj); \
394 # define MkDProtect2(_debug,_call) if (MK_RT_REF.debug < _debug) { \
395 MkLogV_2(fmtobj,MK_COLOR_ORANGE "Warning: ignore call to '%s' from '%s' with '%d'" \
396 MK_COLOR_RESET "\n", __func__, _call, debug); \
397 printSTACK_1(fmtobj); \
411#define META_USE_SELF_REFCOUNT
425#ifndef __has_parser__
434# define __parser__(...)
436# define __parser__define__(...)
440# define __parser__push__(...)
442# define __parser__pop__
454# define __parser__global__(...)
456# define __parser__global__define__(...)
460# define __parser__global__push__(...)
462# define __parser__global__pop__
495#define MK_PARSER_fmtobj MK_OBJN fmtobj __parser__(default=NULL)
509 # define __attribute__(dummy)
510 # define __func__ __FUNCTION__
511 # define MK_CLRCALL __clrcall
512 # define MK_STDCALL __stdcall
513 # define MK_CDECL __cdecl
516 # ifndef PARSE_C_HEADER_TO_META
517 # define mk_inline static inline
520 # define mk_unlink _unlink
521 # define mk_snprintf _snprintf
523 # define MK_ATTR_HOT ???
524 # define MK_ATTR_COLD ???
535 # ifndef PARSE_C_HEADER_TO_META
536 # define mk_inline static inline
538 # define mk_unlink unlink
539 # define mk_snprintf snprintf
541 # define MK_ATTR_HOT __attribute__((hot))
542 # define MK_ATTR_COLD __attribute__((cold))
547 # define MK_DECL MK_CLRCALL
548#elif defined(META_COMPILE_AS_CC)
549 # define MK_DECL MK_STDCALL
551 # define MK_DECL MK_CDECL
558#undef BEGIN_MK_C_DECLS
560#if defined(META_COMPILE_AS_CC)
561# define BEGIN_MK_C_DECLS namespace libmkkernel {
562# define END_MK_C_DECLS }
563#elif defined(__cplusplus)
564# define BEGIN_MK_C_DECLS extern "C" {
565# define END_MK_C_DECLS }
567# define BEGIN_MK_C_DECLS
568# define END_MK_C_DECLS
576#if defined(_MSC_VER) || (__GNUC__ == 2 && __GNUC_MINOR__ < 96)
577 #define likely(x) !!(x)
578 #define unlikely(x) !!(x)
580 #define likely(x) __builtin_expect((x),1)
581 #define unlikely(x) __builtin_expect((x),0)
584#ifndef PARSE_C_HEADER_TO_META
586 # include <inttypes.h>
597 # include <stdbool.h>
601#if defined(_WIN32) && !defined(__CYGWIN__)
602 # ifndef PARSE_C_HEADER_TO_META
603 # include <winsock2.h>
607 # define mk_timeval timeval
616 # define mk_timeval timeval
617 # define mk_timezone timezone
623#define MK_UNUSED __attribute__((unused))
625#define MK_NO_RETURN __attribute__((noreturn))
626#define MK_UNREACHABLE __builtin_unreachable()
628#define MK_ARTIFICIAL __attribute__((__artificial__))
630#define MK_DEPRECATED __attribute__ ((deprecated))
632#define MK_OPTIMIZE_0 __attribute__((optimize("O0")))
634#ifndef PARSE_C_HEADER_TO_META
696#define MK_NULL_YES true
699#define MK_NULL_NO false
705#define MK_NULL_STR "MK_NULL"
711#define MK_NULL_STR_LEN strlen(MK_NULL_STR)
728 return ((__str) ? strcmp((__str),
MK_NULL_STR)==0 :
true);
734 return ((__str) ? (__str)[0] ==
'\0' || strcmp((__str),
MK_NULL_STR)==0 :
true);
890 # define MkThreadLocal __thread
891 # define MK_RT_SHIFT 1
892 # define MK_RT_ARGS_ONLY MK_RT mkrt
893 # define MK_RT_ARGS MK_RT_ARGS_ONLY,
894 # define MK_RT_CALL_ONLY mkrt
895 # define MK_RT_CALL MK_RT_CALL_ONLY,
896 # define MK_RT_CALL_O(o) MkRT_O(o),
897 # define MK_RT_CALL_X(x) MkRT_X(x),
898 # define MK_RT_CALL_NULL_ONLY MkRT
899 # define MK_RT_CALL_NULL MK_RT_CALL_NULL_ONLY,
900 # define MK_RT_NULL NULL,
901 # define MK_RT_PTR mkrt
902 # define MK_RT_REF (*mkrt)
903 # define MK_RT_REF_NULL (MkRuntimeRLS)
904 # define MK_RT_UNUSED MK_UNUSED
905 # define MK_RT_CALL_RT(ptr) ptr,
906 # define MK_PARSER_RT_ONLY MK_RT_ARGS_ONLY __parser__(internal,default=N#RUNTIME)
907 # define MK_PARSER_RT MK_PARSER_RT_ONLY,
912 # define MkThreadLocal
913 # define MK_RT_SHIFT 0
914 # define MK_RT_ARGS_ONLY void
916 # define MK_RT_CALL_ONLY
918 # define MK_RT_CALL_O(o)
919 # define MK_RT_CALL_X(x)
920 # define MK_RT_CALL_NULL_ONLY
921 # define MK_RT_CALL_NULL
923 # define MK_RT_PTR (&MkRuntimeRLS)
924 # define MK_RT_REF (MkRuntimeRLS)
925 # define MK_RT_REF_NULL (MkRuntimeRLS)
926 # define MK_RT_UNUSED
927 # define MK_RT_CALL_RT(ptr)
928 # define MK_PARSER_RT_ONLY void
929 # define MK_PARSER_RT
933# define MK_RT_ATTR_FORMAT_1 __attribute__((format (printf, 1+MK_RT_SHIFT, 2+MK_RT_SHIFT)));
934# define MK_RT_ATTR_FORMAT_2 __attribute__((format (printf, 2+MK_RT_SHIFT, 3+MK_RT_SHIFT)))
935# define MK_RT_ATTR_FORMAT_4 __attribute__((format (printf, 4+MK_RT_SHIFT, 5+MK_RT_SHIFT)))
939# define __MK_ATTR_RT_RUNTIME
941#if META_HDL_USE__NONNULL__GCC_ATTRIBUTE == 1
943 # define __MK_ATTR_RT_INSTANCE __attribute__((nonnull(1+MK_RT_SHIFT)))
944 # define __MK_ATTR_INSTANCE __attribute__((nonnull(1)))
945 # define MK_INSTANCE_HDL(x)
947 # define __MK_ATTR_RT_INSTANCE
948 # define __MK_ATTR_INSTANCE
949 # define MK_INSTANCE_HDL(x) assert(x!=NULL)
953#define MK_ATTR_INSTANCE __MK_ATTR_INSTANCE
954#define MK_ATTR_RT_INSTANCE __MK_ATTR_RT_RUNTIME __MK_ATTR_RT_INSTANCE
955#define MK_ATTR_STATIC __parser__(static)
956#define MK_ATTR_RT_STATIC __MK_ATTR_RT_RUNTIME __parser__(static)
959#define MK_INSTANCE_RT_X(x) MK_INSTANCE_HDL(x); MkRtSetup_XN_RT(x); META_DEBUG_ERROR_checkX(x)
960#define MK_INSTANCE_RT_X_NULL(x) MkRtSetup_X_RT(x); META_DEBUG_ERROR_checkX(x)
961#define MK_INSTANCE_RT_O(o) MK_INSTANCE_HDL(o); MkRtSetup_ON_RT(o); META_DEBUG_ERROR_checkO(o)
962#define MK_INSTANCE_RT_O_NULL(o) MkRtSetup_O_RT(o); META_DEBUG_ERROR_checkO(o)
963#define MK_DESTRUCTOR_RT_X(c,x) MK_INSTANCE_HDL(x); \
964 if (!MkCheckNN(c,x)) return; \
965 MkRtSetup_XN_RT(x); META_DEBUG_ERROR_check()
966#define MK_STATIC_RT MkRtSetup_NULL_RT; META_DEBUG_ERROR_check()
975#ifndef PARSE_C_HEADER_TO_META
1055#if defined(_MSC_VER) && defined(_DLL)
1062#ifdef META_IS_WINDOWS
1063 # define META_DIR_SEPARATOR '\\'
1064 # define META_EOL "\r\n"
1066 # define META_DIR_SEPARATOR '/'
1067 # define META_EOL "\n"
1077#if defined(META_IGNORE_EXTERN)
1081# if defined(DLL_EXPORT)
1083# if defined(MK_C_BUILD_DLL)
1084# define MK_EXTERN __declspec(dllexport)
1086# define MK_EXTERN __declspec(dllimport)
1090# define MK_EXTERN __attribute__ ((visibility("default")))
1098#undef MK_EXTERN_DATA
1099#if defined(META_PRIVATE)
1100# define MK_EXTERN_DATA extern
1101#elif defined(META_IGNORE_EXTERN)
1102# define MK_EXTERN_DATA extern
1105# if defined(DLL_EXPORT)
1107# if defined(MK_C_BUILD_DLL)
1108# define MK_EXTERN_DATA __declspec(dllexport)
1110# define MK_EXTERN_DATA __declspec(dllimport)
1114# define MK_EXTERN_DATA __attribute__ ((visibility("default"))) extern
1117# define MK_EXTERN_DATA extern
1123#define MK_CPPXSTR(s) MK_CPPSTR(s)
1125#define MK_CPPSTR(s) #s
1127#define MK_CONCAT(a,b) a ## b
1128#define MK_CONCAT2(a,b) MK_CONCAT(a,b)
1129#define MK_CONCAT3(a,b,c) a ## b ## c
1133 #define mk_append_fix_str(t,s) t=stpcpy(t,s)
1135 #define mk_append_fix_str(t,s) t=strcpy(t,s)+sizeof(s)-1
1139#define mk_bit_compare(t,f) (t&f)==f
1166#define MK_ALFA_STR ((MkStringR){1,"@"})
1174__parser__(type=ME_NB1_MK_BOL:
"1 byte 'boolean' data-type")
1179__parser__(type=ME_NB0_MK_BOOL:"'
boolean' data-type":primary)
1181#define bool2str(_bool) (_bool?"true":"false")
1191__parser__(type=ME_NI1_MK_I8:
"1 byte 'byte' data-type")
1194__parser__(type=ME_NI2_MK_I16:"2
byte '
short integer' data-type":primary:int16_t)
1197__parser__(type=ME_NI4_MK_I32:"4
byte 'integer' data-type":primary:int32_t)
1200#if defined(_MSC_VER)
1204 __parser__(type=ME_NI8_MK_I64:
"8 byte 'wide integer' data-type":primary:int64_t)
1208__parser__(type=ME_NIL_MK_LONG:
"4/8 byte 'long' data-type":primary)
1219__parser__(type=ME_NU1_MK_U8:"1
byte '
unsigned byte' data-type":primary:uint8_t)
1221__parser__(type=ME_NU2_MK_U16:"2
byte '
unsigned short' data-type":primary:uint16_t)
1223__parser__(type=ME_NU4_MK_U32:"4
byte '
unsigned integer' data-type":primary:uint32_t)
1225__parser__(type=ME_NU8_MK_U64:"8
byte '
unsigned wide' data-type":primary:uint64_t)
1229__parser__(type=ME_NUL_MK_ULN:"8
byte '
unsigned long' data-type":primary)
1239__parser__(type=ME_NF4_MK_FLT:"4
byte '
float' data-type":primary)
1242__parser__(type=ME_NF8_MK_DBL:"8
byte '
double' data-type":primary)
1263__parser__(type=ME_NIH_MK_HDL:"handle data-type")
1266#define MK_HDL_REF_S3(__prefix) __prefix ## NI4
1267#define MK_HDL_REF_S1(__prefix) __prefix ## I32
1268#define MK_HDLT MK_I32T
1282__parser__(type=ME_NIL_MK_SIZE:
"long byte 'size' datay-type")
1286__parser__(type=ME_RUA_MkBufferAtomU:"atomic native data buffer type")
1293#define MK_FORMAT_N "%i"
1296__parser__(type=ME_NI4_MK_DBG:
"debug-level data-type")
1367__parser__(type=ME_NIL_MK_TIME_T:"time [sec] data-type")
1369#define MK_FORMAT_TIME "%li"
1370#define MK_TIME ((MK_TIME_T)time(NULL))
1371#define MK_TIME_MAX (365*24*60*60)
1382__parser__(type=ME_PVB_MK_PTRB:
"pointer type data-type")
1386__parser__(type=ME_PVX_MK_PTR:"generic pointer data-type":primary)
1389__parser__(type=ME_PVN_MK_PTRN:"const generic pointer data-type":primary)
1392__parser__(type=ME_PCX_MK_CCP:"class constructor/destructor data type")
1395__parser__(type=ME_PAX_MK_CBP:"generic pointer to call-back data")
1398__parser__(type=ME_CXC_MK_MNG:"managed
object pointer; datatype will be checked at runtime")
1401__parser__(type=ME_CXN_MK_MNGN:"const - a managed
object pointer; datatype will be checked at runtime")
1404__parser__(type=ME_PEX_MK_EXP:"target language exception-class-
object")
1407__parser__(type=ME_CXC_MkExceptionC:"target language library-exception-class-
object")
1418__parser__(type=ME_PLB_MK_LSTB:"list type data-type")
1422__parser__(type=ME_PLX_MK_LST:"list pointer data-type")
1433__parser__(type=ME_PBB_MK_BINB:"
byte-array type data-type")
1437__parser__(type=ME_PBX_MK_BIN:"
byte-array pointer data-type":primary)
1441__parser__(type=ME_PBN_MK_BINN:"const
byte-array pointer data-type":primary)
1452__parser__(type=ME_PSB_MK_STRB:"
string type data-type")
1456__parser__(type=ME_PSX_MK_STR:"
string pointer data-type":primary)
1460__parser__(type=ME_PSN_MK_STRN:"constant
string pointer data-type":primary)
1474__parser__(type=ME_PFX_MK_FST:
"constant 'printf' format string")
1483__parser__(type=ME_PVX_MK_NAT_OBJECT:"target language
object pointer")
1485__parser__(type=ME_PVX_MK_NAT_LIST:"target language list pointer")
1505 __parser__(type=ME_CCC_MkObjectC:"MkObjectC class handle":primary)
1508 __parser__(type=ME_CCN_MkObjectC:"const - MkObjectC class handle":primary)
1519 __parser__(type=ME_CCC_MkBufferC:"MkBufferC class handle":primary)
1522 __parser__(type=ME_CCN_MkBufferC:"const - MkBufferC class handle":primary)
1533 __parser__(type=ME_CCC_MkBufferStreamC:"MkBufferStreamC class handle":primary)
1536 __parser__(type=ME_CCN_MkBufferStreamC:"const - MkBufferStreamC class handle":primary)
1547 __parser__(type=ME_CCC_MkBufferListC:"MkBufferListC class handle":primary)
1550 __parser__(type=ME_CCN_MkBufferListC:"const - MkBufferListC class handle":primary)
1561 __parser__(type=ME_CCC_MkLogFileC:"MkLogFileC class handle":primary)
1564 __parser__(type=ME_CCN_MkLogFileC:"const - MkLogFileC class handle":primary)
1575 __parser__(type=ME_CCC_MkErrorC:"MqErrorC class handle":primary)
1578 __parser__(type=ME_CCN_MkErrorC:"const - MqErrorC class handle":primary)
1589 __parser__(internal,type=ME_CCC_MkExtensionC:"abstract class for the extension technology":internal)
1592 __parser__(internal,type=ME_CCN_MkExtensionC:"const - abstract class for the extension technology":internal)
1603 __parser__(internal,type=ME_CCC_MkErrExtC:"final class for the
MkErrorS extention technology":internal)
1606 __parser__(internal,type=ME_CCN_MkErrExtC:"const - final class for the
MkErrorS extention technology":internal)
1617 __parser__(internal,type=ME_CCC_MkRtExtC:"final class for the
MkRuntimeS extention technology":internal)
1620 __parser__(internal,type=ME_CCN_MkRtExtC:"const - final class for the
MkRuntimeS extention technology":internal)
1631 __parser__(type=ME_CCC_MkRuntimeC:"runtime singleton class
object":primary)
1634 __parser__(type=ME_CCN_MkRuntimeC:"const - runtime singleton class
object":primary)
1645 __parser__(internal,type=ME_CCC_MkTypeC:"a managed
object class type !base! pointer":internal)
1648 __parser__(internal,type=ME_CCN_MkTypeC:"const - a managed
object class type !base! pointer":internal)
1660__parser__(type=ME_CXC_MK_BAC:"a list of 'buffer' as last argument in function")
1665__parser__(type=ME_CXN_MK_BAC:"const - a list of 'buffer' as last argument in function")
1697 return bin.
data == NULL;
1779 if (len < 0) len = strR.
len;
1780 if (start > strR.
len) {
1782 }
else if ((start+len) > strR.
len) {
1792 assert(len_out != NULL);
1793 assert(str_out != NULL);
1794 *len_out = strR.
len; *str_out = strR.
ptr;
1861__parser__(doc-group=Enum,doc-index=_ignore_,
class=MkKernel,no-rpc,prefix=EnumFunc,
return-type-
default-no)
1866__parser__(doc-group=Enum,doc-index=_ignore_,class=MkKernel,no-rpc,prefix=EnumFunc,return-type-default-no)
1874__parser__(doc-group=Enum,doc-index=_ignore_,
class=MkKernel,no-rpc,prefix=EnumFunc)
1923__parser__(doc-group=Enum,doc-index=_ignore_,
class=MkKernel,no-rpc,prefix=EnumFunc,
return-type-
default-no)
1928__parser__(doc-group=Enum,doc-index=_ignore_,class=MkKernel,no-rpc,prefix=EnumFunc,return-type-default-no)
1936__parser__(doc-group=Enum,doc-index=_ignore_,
class=MkKernel,no-rpc,prefix=EnumFunc)
1957__parser__(internal,no-rpc,prefix=EnumFunc,
return-type-
default-no)
1962__parser__(internal,no-rpc,prefix=EnumFunc,return-type-default-no)
1998__parser__(internal,no-rpc,prefix=EnumFunc,
return-type-
default-no)
2003__parser__(internal,no-rpc,prefix=EnumFunc,return-type-default-no)
2023#define MK_TYPE_IS_1_I8E (1<<0)
2026#define MK_TYPE_IS_2_I8E (1<<1)
2029#define MK_TYPE_IS_4_I8E (1<<2)
2032#define MK_TYPE_IS_8_I8E (1<<3)
2035#define MK_TYPE_IS_NATIVE ( MK_TYPE_IS_1_I8E | MK_TYPE_IS_2_I8E | \
2036 MK_TYPE_IS_4_I8E | MK_TYPE_IS_8_I8E )
2039#define MK_TYPE_SHIFT 4
2067__parser__(doc-group=Enum,doc-index=_ignore_,
class=MkKernel,no-rpc,prefix=EnumFunc,
return-type-
default-no)
2072__parser__(doc-group=Enum,doc-index=_ignore_,class=MkKernel,no-rpc,prefix=EnumFunc,return-type-default-no)
2080__parser__(doc-group=Enum,doc-index=_ignore_,
class=MkKernel,no-rpc,prefix=EnumFunc)
2167#if defined(__cplusplus)
2198#define MkType_O MK_BOL
2199#define MkType_Y MK_I8
2200#define MkType_S MK_I16
2201#define MkType_I MK_I32
2202#define MkType_W MK_I64
2203#define MkType_F MK_FLT
2204#define MkType_D MK_DBL
2205#define MkType_C MK_STRN
2206#define MkType_B MK_BIN
2207#define MkType_U MK_BUF
2208#define MkType_L MK_BFL
2256__parser__(doc-group=Enum,doc-index=_ignore_,
class=MkKernel,no-rpc,prefix=EnumFunc,
return-type-
default-no)
2261__parser__(doc-group=Enum,doc-index=_ignore_,class=MkKernel,no-rpc,prefix=EnumFunc,return-type-default-no)
2269__parser__(doc-group=Enum,doc-index=_ignore_,
class=MkKernel,no-rpc,prefix=EnumFunc)
2309 #define MkCacheItemS_signature 0x44196912
2327#define MkCacheS_name_size 32
2337#define MkCacheS_MkCacheItemS_size 8
2425__parser__push__(no-rpc,template-overload,doc-group=libmkkernel,doc-index=Setup,prefix=Setup);
2439#ifndef META_COMPILE_AS_CC
2440__attribute__ ((constructor(200)))
2459#ifndef META_COMPILE_AS_CC
2460__attribute__ ((destructor(200)))
2574typedef void (*MkSysAbortF) (
2616 unsigned int const usec
2628 unsigned int const sec
2684__attribute__ ((alloc_size (2, 3)))
2697__attribute__ ((alloc_size (2)))
2748__attribute__ ((alloc_size (3)))
2803#define MkSysFree(pointer) \
2805 if ( likely((pointer) != (NULL)) ) { \
2806 (*MkLal.SysFree)((MK_PTR)pointer); \
2807 (pointer) = (NULL); \
2812#define MkSysFreeNonNull(pointer) (*MkLal.SysFree)((MK_PTR)pointer)
2909 useconds_t const usec
2969 bool const includeExtension
3022#define MkSysStringSetNULL_R(_str) _str[0] = '\0'
3026#define MkSysStringSet_R(_str,_val) strcpy(_str,_val)
3030#define MkSysStringIsNULL_R(_str) (_str[0] == '\0')
3039 return (str != NULL && *str !=
'\0');
3044#define MkSysStringIsEQUAL(_str,_other) (strcmp(_str,_other) == 0)
3048#define MkSysStringIsLenEQUAL(_str,_other,_len) (strncmp(_str,_other,(size_t)_len) == 0)
3057 return str == NULL ?
"" : str;
3293#define __MkCheckTO(t,o) (((*o).signature & (*t).objmask) == (*t).objsig)
3294#define _MkCheckTO(t,o) ((o) && __MkCheckTO((t),(o)))
3295#define __MkCheckO(cls,o) (((*o).signature & cls##_MASK) == cls##_SIGNATURE)
3296#define _MkCheckO(cls,o) ((o) && __MkCheckO(cls,(o)))
3297#define __MkCheckX(cls,x) __MkCheckO(cls,(cls##_X2obj(x)))
3298#define _MkCheckX(cls,x) ((x) && __MkCheckO(cls,(cls##_X2obj(x))))
3299#define __MkCheckM(cls,m) __MkCheckO(cls,((MK_OBJ)(m)))
3300#define _MkCheckM(cls,m) ((m) && __MkCheckM(cls,m))
3302#define MkCheckNN(cls,x) __MkCheckO(cls,(cls##_X2obj(x)))
3304#ifdef __SANITIZE_ADDRESS__
3306 #define MkSanitizeCheck(_root,_m) _MkCheckM(_root,_m)
3307 #define MkSanitizeCheckO(_root,_o) _MkCheckO(_root,_o)
3309 #define MkSanitizeCheck(_root,_m) _MkCheckM(_root,_m)
3310 #define MkSanitizeCheckO(_root,_o) _MkCheckO(_root,_o)
3315#define MkAssertO(cls,o) assert(o==NULL?true:__MkCheckO(cls,o))
3316#define MkAssertX(cls,x) assert(x==NULL?true:__MkCheckX(cls,o))
3321# define MkAssertCastM(cls,m) ((cls##_type)(m))
3323# define MkAssertCastM(cls,m) ((cls##_type)(({MK_OBJ o=(MK_OBJ)(m);MkAssertO(cls,o);o;})))
3326#define toTT(_type) (MkTYP(_type))
3331#define MK_NULL_SIGNATURE 0
3352#define MkDbgObjInstancesO_2(o,c) \
3355 mk_dbg_color_ln(c,"MkDbgObjInstances: %s[%p] prev<%p>, next<%p>, var<" #o ">", \
3356 (o)->type->type_name, o, (o)->obj_protect.prev, (o)->obj_protect.next); \
3358 mk_dbg_color_ln(c,"MkDbgObjInstances: %s[NULL] var<" #o ">", "unknown"); \
3361#define MkDbgObjInstancesX_2(x,c) MkDbgObjInstancesO_2(MkOBJ(x),c)
3362#define MkDbgObjInstancesX(x) MkDbgObjInstancesX_2(x,MK_COLOR_CYAN)
3363#define MkDbgObjInstancesO(o) MkDbgObjInstancesO_2(o,MK_COLOR_CYAN)
3365#if META_DEBUG & META_DEBUG_REFCOUNT
3367 __attribute__ ((visibility(
"default"))) void
3368 MkDbgDeepWriter(
void* mng,const
char* ident, const
char* func, const
char* fmt,...);
3372 #define MkDbgDeepWriter(...)
3376#define MkDbgDeepX_4(m,ident,func,fmt,...) MkDbgDeepWriter(m, ident, func, fmt, __VA_ARGS__)
3377#define MkDbgDeepX_3(m,ident,fmt,...) MkDbgDeepX_4(m,ident,__func__,fmt,__VA_ARGS__)
3378#define MkDbgDeepX_2(m,ident) MkDbgDeepX_4(m,ident,__func__,NULL,NULL)
3410#if defined(META_USE_SELF_REFCOUNT)
3448 #define MkObjectC_SIGNATURE (0x59B3u<<16)
3449 #define MkObjectC_MASK (((1u<<16)-1)<<16)
3457 #define MkObjectC_X2obj(x) (x)
3470 #define MkObjectC_T (&MK_RT_REF._MkObjectC_T)
3472 #define MkObjectC_TT (MkTYP(MkObjectC_T))
3474 #define MkObjectST MkObjectC_T
3476 #define MkObjectSTT (MkTYP(MkObjectST))
3478 #define MkObjectC_type MK_OBJ
3480 #define MkObjectCT_X(instance) ( (struct MkTypeDefS *) (MkOBJ_R(instance).type) )
3482 #define MkObjectCTT_X(instance) (MkOBJ_R(instance).type)
3484 #define MkObjectCT_TT(typ) ( (struct MkTypeDefS *) (typ) )
3486 #define MkObjectC_NS MK
3488 #define MkObjectCTT MkObjectCTT
3490 #define MkObjectCT ( (struct MkTypeDefS *) MkObjectCTT )
3498 #pragma GCC diagnostic push
3499 #pragma GCC diagnostic ignored "-Wattributes"
3517 #pragma GCC diagnostic pop
3518 #define MkObjectC_Check(mng) MkObjCheck(mng)
3528 META_ATTRIBUTE_SANITIZE
3536 META_ATTRIBUTE_SANITIZE
3543 #define MkObjRaise(_obj) if (!_MkCheckX(MkObjectC,_obj)) { \
3544 MkErrorSetC_1E("'MkObjectC' hdl is NULL"); \
3549 #define MkOBJ_R(x) (*(x)).super.obj
3551 #define MkOBJ(x) (&MkOBJ_R(x))
3569__parser__push__(doc-group=_ignore_,doc-index=Class,doc-name=Export,
class=MkObjectC,no-rpc);
3584#define MkObjectHandleGetOfType_1X(x) MkObjectHandleGetOfType(MkOBJ(x))
3619__parser__push__(doc-group=_ignore_,doc-index=Class,doc-name=Export,
class=MkObjectC);
3641#define MkObjectHandleGet_1X(x) MkObjectHandleGet(x?MkOBJ(x):NULL)
3665#define MkObjectHandleResolve_e(netHdl) ({ \
3666 MK_HDL tmpHdl=netHdl; \
3671 tmp=MkObjectHandleResolve(tmpHdl); \
3673 MkErrorSetC_1_NULL("ERROR: 'MkObjectC' handle is 'NULL'"); \
3702 __parser__(doc-group=_ignore_,doc-index=Class,doc-name=Misc,
class=MkObjectC,null-
return-allow)
3905#define MkDbgTyp2(t,c) \
3906 mk_dbg_color_ln(c,"MkDbgTyp[%-32s]: typ<ID=%-2d,P=%-14p,RT=%p> type_class<%s:%p>, " #t, \
3907 MK_TRIM_LEFT(32,(t)->type_name), (t)->type_id, t, MkRT_X(t), \
3908 (t)->type_class->type_name, (t)->type_class)
3909#define MkDbgTyp(t) MkDbgTyp2(t,MK_COLOR_LIGHT_CYAN)
3910#define MkDbgTypListAll2(t,c) do { \
3912 MkRuntimeLogBufferPush(); \
3913 DL_FOREACH2((t)->type_class->instancesR,o,obj_protect.next) { \
3914 MkDbgTyp2(MkTyp(o),c); \
3916 MkRuntimeLogBufferPop(); \
3918#define MkDbgTypListAll(t) MkDbgTypListAll2(t,MK_COLOR_GREEN)
3920#define MkDbgTypInstances_2(t,c) \
3922 MK_TYP _typ = (t); \
3924 mk_dbg_start_2(c,"MkDbgTypInstances: %s[%p] ", _typ->type_name, _typ); \
3926 for (MK_OBJ obj=MkTypeInstances(_typ); obj; obj=MkObjectNext(obj)) { \
3927 mk_dbg_next_2(c,"%p,",obj); \
3930 mk_dbg_next_2(MK_COLOR_RED,"%s", "break"); \
3936 mk_dbg_color_ln(c,"MkDbgTypInstances: %s[%p] ", #t, _typ); \
3940#define MkDbgTypInstances(t) MkDbgTypInstances_2(t,MK_COLOR_CYAN)
3955 #define MkTypeS_name_size 32
4006 #define MkTypeC_SIGNATURE (MkObjectC_SIGNATURE ^ (11u<<10))
4007 #define MkTypeC_MASK (((1u<<22)-1)<<10)
4015 #define MkTypeC_X2typ(x) (x)
4016 #define MkTypeC_X2obj(x) MkOBJ(x)
4029 #define MkTypeSTT (&MK_RT_REF._MkTypeC_TT)
4031 #define MkTypeC_TT (&MK_RT_REF._MkTypeC_TT)
4033 #define MkTypeC_type MK_TYP
4035 #define MkTypeCT_X(instance) ( (struct MkTypeS *) (MkOBJ_R(instance).type) )
4037 #define MkTypeCTT_X(instance) (MkOBJ_R(instance).type)
4039 #define MkTypeCT_TT(typ) ( (struct MkTypeS *) (typ) )
4041 #define MkTypeC_NS MK
4043 #define MkTypeCTT MkTypeCTT
4045 #define MkTypeCT ( (struct MkTypeS *) MkTypeCTT )
4053 #pragma GCC diagnostic push
4054 #pragma GCC diagnostic ignored "-Wattributes"
4072 #pragma GCC diagnostic pop
4073 #define MkTypeC_Check(mng) MkTypCheck(mng)
4106#define MkTYP_R(x) (*(x)).super.typ
4108#define MkTYP(x) (&MkTYP_R(x))
4110#define MkTYP_O(o) (*o).type
4112#define MkTYP_X(x) MkOBJ_R(x).type
4142 #define MkTypeDefC_SIGNATURE (MkTypeC_SIGNATURE ^ (1u<<6))
4143 #define MkTypeDefC_MASK (((1u<<26)-1)<<6)
4151 #define MkTypeDefC_X2typ(x) MkTYP(x)
4152 #define MkTypeDefC_X2obj(x) MkOBJ(x)
4165 #define MkTypeDefSTT (&MK_RT_REF._MkTypeDefC_TT)
4167 #define MkTypeDefC_TT (&MK_RT_REF._MkTypeDefC_TT)
4169 #define MkTypeDefCT_X(instance) ( (struct MkTypeS *) (MkOBJ_R(instance).type) )
4171 #define MkTypeDefCTT_X(instance) (MkOBJ_R(instance).type)
4173 #define MkTypeDefCT_TT(typ) ( (struct MkTypeS *) (typ) )
4175 #define MkTypeDefC_NS MK
4177 #define MkTypeDefCTT MkTypeDefCTT
4179 #define MkTypeDefCT ( (struct MkTypeS *) MkTypeDefCTT )
4207#define MkTypeSlotResolve(_tt,fptr,force) ({ \
4208 MK_TYP tt = (_tt) ; \
4209 tt == NULL ? NULL : \
4210 !force && tt->fptr == (MK_PTR) 0x1 ? NULL : \
4211 tt->fptr > (typeof(tt->fptr)) 0x1 ? tt->fptr : \
4212 tt == MkTypeSTT ? NULL : \
4213 (typeof(tt->fptr)) MkTypeSlotResolveP(MK_RT_CALL tt, offsetof(struct MkTypeS, fptr), force); \
4216#define MkTypeSlotCall(_tt,fptr,...) do { \
4217 typeof((_tt)->fptr) slot = MkTypeSlotResolve((_tt),fptr,false); \
4218 if (slot) (*slot)(MK_RT_CALL __VA_ARGS__); \
4245#if defined(META_USE_SELF_REFCOUNT)
4247 #define MkObjInit2(rtmkV,rtExtV,sigV,typeV,refCountV,isLocalV) \
4248 (struct MkObjectS) { \
4249 .signature = sigV, \
4250 .refCount = refCountV, \
4254 .selfCreated = false, \
4255 .selfRefCount = 0, \
4257 .objRtExt = rtExtV, \
4259 .isLocal = isLocalV, \
4266 #define MkObjInit2(rtmkV,rtExtV,sigV,typeV,refCountV,isLocalV) \
4267 (struct MkObjectS) { \
4268 .signature = sigV, \
4269 .refCount = refCountV, \
4273 .selfCreated = false, \
4275 .objRtExt = rtExtV, \
4277 .isLocal = isLocalV, \
4284#define MkObjInit(rtmkV,rtExtV,cls,refCountV,isLocalV) \
4285 MkObjInit2(rtmkV,rtExtV,cls##_SIGNATURE,cls##_TT,refCountV,isLocalV)
4288#define MkObjInitFromType(typeV,isLocalV) \
4289 MkObjInit2(MK_RT_PTR, NULL, (*typeV).objsig, typeV, 0, isLocalV)
4292#define MkObjInitFromInstance(instV) \
4293 MkObjInit2(MK_RT_PTR, NULL, MkOBJ_R(instV).type->objsig, MkOBJ_R(instV).type, 0, false)
4392#define MkObjectDelete_NULL(obj) MkObjectDeleteToNull(MkObjectDelete_RT,MK,obj)
4393#define MkObjectDelete_NULL_X(x) MkObjectDeleteToNull_X(MkObjectDelete_RT,MK,x)
4394#define MkObjectDelete_1X(x) MkObjectDeleteToNull_X(MkObjectDelete_RT,MK,x)
4396#define MkObjectDeleteToNull(fct,NS,x) if (x) { fct (NS##_RT_CALL x); (x) = NULL ; }
4397#define MkObjectDeleteToNull_X(fct,NS,x) if (x) { fct (NS##_RT_CALL MkOBJ(x)); (x) = NULL ; }
4420#define MkObjectDispose_NULL(obj) MkObjectDeleteToNull(MkObjectDispose_RT,MK,obj)
4421#define MkObjectDispose_NULL_X(x) MkObjectDeleteToNull_X(MkObjectDispose_RT,MK,x)
4422#define MkObjectDispose_1X(x) MkObjectDispose(MkOBJ(x))
4425#define MkObjectDeleteCallF_CHECK do { \
4426 assert (__data__ != NULL); \
4431#define MkObjectDeleteCallF_ARGS \
4433 MK_OBJN const obj __parser__(internal), \
4434 MK_STRN const typeName, \
4435 MK_HDL const typeHdl, \
4436 MK_HDL const objHdl, \
4437 MK_CBP const __data__ \
4439#define MkObjectDeleteCallF_CALL MK_RT_CALL obj, __data__
4489#define MkObjectDeleteFreeF_ARGS MK_RT_ARGS MK_CBP *dataP __parser__(inout)
4526__parser__(class=MkObjectC,callback-name=ObjectDelete,callback-null)
4604#define MkRefLOCK 999999
4614#define MkRefIncr_1X(x) MkRefIncr(MkOBJ(x))
4615#define MkRefIncr_1M(m) MkRefIncr(MkObj(m))
4630#define MkRefIncr_FX(x) MkRefIncr(MkOBJ(x))
4649#define MkRefDecr_O(o) do { MkRefDecr_RT(MK_RT_CALL o); o=NULL; } while (0)
4653#define MkRefDecr_X(x) do { MkRefDecr_RT(MK_RT_CALL MkOBJ(x)); x=NULL; } while (0)
4655#define MkRefDecr_X_NULL(x) do { MkRefDecr_RT(MK_RT_NULL MkOBJ(x)); x=NULL; } while (0)
4660#define MkRefDecr_M(m) do { MkRefDecr_RT(MK_RT_CALL MkObj(m)); m=NULL; } while (0)
4662#define MkRefDecr_M_NULL(m) do { MkRefDecr_RT(MK_RT_NULL MkObj(m)); m=NULL; } while (0)
4665#define MkRefDecr_FX(x) do { --(MkOBJ_R(x).refCount); } while(0)
4682#define MkRefIncrSelf_2X(x,s) MkRefIncrSelf(MkOBJ(x),s)
4730 return (*obj).refCount;
4733#define MkRefGet_1X(x) MkRefGet(MkOBJ(x))
4742#define MkRefLock_1X(x) MkRefLock(MkOBJ(x))
4752#define MkRefIsLocked_1X(x) MkRefIsLocked(MkOBJ(x))
4755#define MkRefSet(target,source) ({ \
4756 if (target != source) { \
4757 typeof(target) targetSave=target; \
4759 MkRefDecr_X(targetSave);\
4760 MkRefIncr_1X(target);\
4768#define MkRefCidN_NULL() MkRefCidN_RT(MK_RT_CALL_NULL_ONLY)
4795#define MkSelfSet_3X(x,self,env) MkSelfSet(MkOBJ(x),self,env)
4806#define MkSelfGet_1X(x) MkSelfGet(MkOBJ(x))
4839#define MkSelfNew_3X(x,self_out,env) MkSelfNew(MkOBJ(x),self_out,env)
4856#define MkSelfCreate_2X(x,env) MkSelfCreate(MkOBJ(x),env)
4872#define MkSelfDelete_1X(x) MkSelfDelete_RT(MK_RT_CALL MkOBJ(x))
4896#define MkSelfDeleteForce_1X(x) MkSelfDeleteForce(MkOBJ(x))
4921#define MkSelfUnlink_1X(x) MkSelfUnlink(MkOBJ(x))
4930#define MkSelfExists_1X(x) MkSelExists(MkOBJ(x))
5042#define MkTypeCreate(clsV, basicV, identV) ({ \
5043 assert(!MkSysStringIsNULL(identV)); \
5044 MK_TYP ret = MkTypeDup2(basicV ## _TT,identV); \
5045 ret->objsig = clsV ## _SIGNATURE; \
5046 ret->objmask = clsV ## _MASK; \
5047 ret->objsize = sizeof(clsV##R); \
5048 ret->type_base = basicV ## _TT; \
5049 ret->type_class = ret; \
5117 assert(
typ != NULL);
5131#define MkTypeForeachInstancesSave(typ) DL_FOREACH_SAFE2((typ)->type_class->instancesR,obj,tmp,obj_protect.next)
5169#define MkTypeLog_2Lvl(t,l,...) MkTypeLog_RT(MK_RT_CALL (t), __VA_ARGS__, (l)
5178#if META_DEBUG & META_DEBUG_TYPE
5179 #define MkTypeLoop(_cls, _var) \
5180 bool _var##_firstB = true; \
5181 _cls##_type _var##_first = (_cls##_type)_cls##_TT->type_class->instancesR; \
5183 _cls##_type _var = _var##_first; \
5184 ({ if (!_var##_firstB && _var == _var##_first) { \
5185 MkPanicV_2M(_var,"[MkTypeLoop] INTERNAL ERROR: found 'circle' in 'MkTypeC=%s'", _var->type_name); \
5186 } ; _var##_firstB = false; _var; }); \
5187 _var = (_cls##_type)_cls##_X2obj(_var)->obj_protect.next \
5190 #define MkTypeLoop(_cls, _var) \
5191 for (_cls##_type _var = (_cls##_type)_cls##_TT->type_class->instancesR; _var != NULL; \
5192 _var = (_cls##_type)_cls##_X2obj(_var)->obj_protect.next)
5233#define MkObjectToName_1X(x) MkObjectToName(MkOBJ(x))
5255#define MkObjectToNameOfType_1X(x) MkObjectToNameOfType(MkOBJ(x))
5273#define MkObjectToNameOfClass_1X(x) MkObjectToNameOfClass_RT(MK_RT_CALL MkOBJ(x))
5290#define MkObjectToString_1X(x) MkObjectToString(x?MkOBJ(x):NULL)
5291#define MkObjectToString_1M(m) MkObjectToString(m?MkObjN(m):NULL)
5378#define MkLogC_4X(x,message,debug,callfunc) MkLogC(MkOBJ(x),message,debug,callfunc)
5379#define MkLogC_3X(x,message,debug) MkLogC_3(MkOBJ(x),message,debug)
5380#define MkLogC_2X(x,message) MkLogC_2(MkOBJ(x),message)
5381#define MkLogW(x,callfunc,_debug,message) MkLogC(MkOBJ(x),message,_debug,callfunc)
5402#define MkDbgV_2X(x,printfmt,...) MkDbgV_RT(MK_RT_CALL MkOBJ(x),__func__,stderr,printfmt,__VA_ARGS__)
5403#define MkDbgV_2O(o,printfmt,...) MkDbgV_RT(MK_RT_CALL o ,__func__,stderr,printfmt,__VA_ARGS__)
5423#define MkLogV_lvl(x,debug,printfmt,...) MkLogV(MkOBJ(x),__func__,debug,printfmt,__VA_ARGS__)
5425#define MkLogV_4M(x,callfunc,debug,printfmt,...) MkLogV(MkObjN(x),callfunc,debug,printfmt,__VA_ARGS__)
5426#define MkLogV_4X(x,callfunc,debug,printfmt,...) MkLogV(MkOBJ(x),callfunc,debug,printfmt,__VA_ARGS__)
5427#define MkLogV_3X(x,callfunc,printfmt,...) MkLogV_3(MkOBJ(x),callfunc,printfmt,__VA_ARGS__)
5428#define MkLogV_2X(x,printfmt,...) MkLogV_2(MkOBJ(x),printfmt,__VA_ARGS__)
5449#define MkLogVL_5X(fmtobj,callfunc,debug,printfmt,var_list) \
5450 MkLogVL(MkOBJ(fmtobj),callfunc,debug,printfmt,var_list)
5465#define MkLogHEX_4X(fmtobj,callfunc,data,len) MkLogHEX_RT(MkOBJ(fmtobj),callfunc,data,len)
5487#define MkObjectLogShort_1X(x) MkObjectLogShort(MkOBJ(x),NULL,0,__func__,0)
5488#define MkObjectLogShort_2Lvl(o,l) MkObjectLogShort(o,NULL,0,__func__,l)
5510#define MkObjectLogLong_1X(x) MkObjectLogLong(MkOBJ(x),NULL,0,__func__,0)
5511#define MkObjectLogLong_1M(m) MkObjectLogLong(MkObj(m),NULL,0,__func__,0)
5533#define MkObjectLogLong_1X(x) MkObjectLogLong(MkOBJ(x),NULL,0,__func__,0)
5534#define MkObjectLogLong_1M(m) MkObjectLogLong(MkObj(m),NULL,0,__func__,0)
5621#define MkObjectLog_1X(x) MkObjectLog(MkOBJ(x),NULL,0,__func__,0)
5622#define MkObjectLog_2Lvl(o,l) MkObjectLog(o,NULL,0,__func__,l)
5658#define MkDbgL_2M(x,message) MkDbgL(MkObj(x),message,0,__func__,-1)
5663__parser__(no-type-extension,
template-overload)
5671#define MkDbgDump_2M(x,message) MkDbgDump_2(MkObj(x),message)
5691#define MkDbgSTACK_3X(x,num,callfunc) MkDbgSTACK_3(MkOBJ(x),num,callfunc)
5707#define MkDbgO_2X(x,callfunc) MkDbgO(MkObj(x),callfunc)
5708#define MkDbgO_1X(x) MkDbgO_2X(x,__func__)
5709#define MkDbgO_1O(x) MkDbgO(x,__func__)
5720#define MkDbgLogC_2X(x,callfunc) MkDbgLogC_2(MkOBJ(x),callfunc)
5757#define MkBufferS_ils_size (0)
5822 #define MkBufferC_SIGNATURE (MkObjectC_SIGNATURE ^ (1u<<10))
5823 #define MkBufferC_MASK (((1u<<22)-1)<<10)
5831 #define MkBufferC_X2buf(x) (x)
5832 #define MkBufferC_X2obj(x) MkOBJ(x)
5845 #define MkBufferC_T (&MK_RT_REF._MkBufferC_T)
5847 #define MkBufferC_TT (MkTYP(MkBufferC_T))
5849 #define MkBufferST MkBufferC_T
5851 #define MkBufferSTT (MkTYP(MkBufferST))
5853 #define MkBufferC_type MK_BUF
5855 #define MkBufferCT_X(instance) ( (struct MkTypeDefS *) (MkOBJ_R(instance).type) )
5857 #define MkBufferCTT_X(instance) (MkOBJ_R(instance).type)
5859 #define MkBufferCT_TT(typ) ( (struct MkTypeDefS *) (typ) )
5861 #define MkBufferC_NS MK
5863 #define MkBufferCTT MkBufferCTT
5865 #define MkBufferCT ( (struct MkTypeDefS *) MkBufferCTT )
5873 #pragma GCC diagnostic push
5874 #pragma GCC diagnostic ignored "-Wattributes"
5892 #pragma GCC diagnostic pop
5893 #define MkBufferC_Check(mng) MkBufCheck(mng)
5903 META_ATTRIBUTE_SANITIZE
5911 META_ATTRIBUTE_SANITIZE
5918 #define MkBufRaise(_buf) if (!_MkCheckX(MkBufferC,_buf)) { \
5919 MkErrorSetC_1E("'MkBufferC' hdl is NULL"); \
5924 #define MkBUF_R(x) (*(x)).super.buf
5926 #define MkBUF(x) (&MkBUF_R(x))
5949__parser__push__(doc-group=_ignore_,doc-index=Class,doc-name=Export,
class=MkBufferC);
6001#define MkBufferHandleResolve_e(netHdl) ({ \
6002 MK_HDL tmpHdl=netHdl; \
6007 tmp=MkBufferHandleResolve(tmpHdl); \
6009 MkErrorSetC_1_NULL("ERROR: 'MkBufferC' handle is 'NULL'"); \
6024 __parser__(flags=
new,doc-group=_ignore_,doc-index=Class,doc-name=Misc,
class=MkBufferC,null-
return-allow)
6052#define MkBuffer64S_ils_size (64)
6083 #define MkBuffer64C_SIGNATURE (MkBufferC_SIGNATURE ^ (1u<<6))
6084 #define MkBuffer64C_MASK (((1u<<26)-1)<<6)
6092 #define MkBuffer64C_X2buf(x) MkBUF(x)
6093 #define MkBuffer64C_X2obj(x) MkOBJ(x)
6106 #define MkBuffer64C_T (&MK_RT_REF._MkBuffer64C_T)
6108 #define MkBuffer64C_TT (MkTYP(MkBuffer64C_T))
6110 #define MkBuffer64ST MkBuffer64C_T
6112 #define MkBuffer64STT (MkTYP(MkBuffer64ST))
6114 #define MkBuffer64CT_X(instance) ( (struct MkTypeDefS *) (MkOBJ_R(instance).type) )
6116 #define MkBuffer64CTT_X(instance) (MkOBJ_R(instance).type)
6118 #define MkBuffer64CT_TT(typ) ( (struct MkTypeDefS *) (typ) )
6120 #define MkBuffer64C_NS MK
6122 #define MkBuffer64CTT MkBuffer64CTT
6124 #define MkBuffer64CT ( (struct MkTypeDefS *) MkBuffer64CTT )
6146#define MkBuffer256S_ils_size (256)
6177 #define MkBuffer256C_SIGNATURE (MkBufferC_SIGNATURE ^ (2u<<6))
6178 #define MkBuffer256C_MASK (((1u<<26)-1)<<6)
6186 #define MkBuffer256C_X2buf(x) MkBUF(x)
6187 #define MkBuffer256C_X2obj(x) MkOBJ(x)
6200 #define MkBuffer256C_T (&MK_RT_REF._MkBuffer256C_T)
6202 #define MkBuffer256C_TT (MkTYP(MkBuffer256C_T))
6204 #define MkBuffer256ST MkBuffer256C_T
6206 #define MkBuffer256STT (MkTYP(MkBuffer256ST))
6208 #define MkBuffer256CT_X(instance) ( (struct MkTypeDefS *) (MkOBJ_R(instance).type) )
6210 #define MkBuffer256CTT_X(instance) (MkOBJ_R(instance).type)
6212 #define MkBuffer256CT_TT(typ) ( (struct MkTypeDefS *) (typ) )
6214 #define MkBuffer256C_NS MK
6216 #define MkBuffer256CTT MkBuffer256CTT
6218 #define MkBuffer256CT ( (struct MkTypeDefS *) MkBuffer256CTT )
6240#define MkBuffer1024S_ils_size (1024)
6271 #define MkBuffer1024C_SIGNATURE (MkBufferC_SIGNATURE ^ (3u<<6))
6272 #define MkBuffer1024C_MASK (((1u<<26)-1)<<6)
6280 #define MkBuffer1024C_X2buf(x) MkBUF(x)
6281 #define MkBuffer1024C_X2obj(x) MkOBJ(x)
6294 #define MkBuffer1024C_T (&MK_RT_REF._MkBuffer1024C_T)
6296 #define MkBuffer1024C_TT (MkTYP(MkBuffer1024C_T))
6298 #define MkBuffer1024ST MkBuffer1024C_T
6300 #define MkBuffer1024STT (MkTYP(MkBuffer1024ST))
6302 #define MkBuffer1024CT_X(instance) ( (struct MkTypeDefS *) (MkOBJ_R(instance).type) )
6304 #define MkBuffer1024CTT_X(instance) (MkOBJ_R(instance).type)
6306 #define MkBuffer1024CT_TT(typ) ( (struct MkTypeDefS *) (typ) )
6308 #define MkBuffer1024C_NS MK
6310 #define MkBuffer1024CTT MkBuffer1024CTT
6312 #define MkBuffer1024CT ( (struct MkTypeDefS *) MkBuffer1024CTT )
6325#ifndef __has_parser__
6336#define MkBuf2XXXfast(buf) (*(buf)->storage.first.A)
6338#define MkBuf2BOLfast(buf) MkBuf2XXXfast(buf).BOL
6339#define MkBuf2I8fast(buf) MkBuf2XXXfast(buf).I8
6340#define MkBuf2I16fast(buf) MkBuf2XXXfast(buf).I16
6341#define MkBuf2I32fast(buf) MkBuf2XXXfast(buf).I32
6342#define MkBuf2I64fast(buf) MkBuf2XXXfast(buf).I64
6343#define MkBuf2FLTfast(buf) MkBuf2XXXfast(buf).FLT
6344#define MkBuf2DBLfast(buf) MkBuf2XXXfast(buf).DBL
6353#define MkBuf2XXX(xxx,len,buf) ({MK_##xxx __tmp; memcpy(&__tmp,buf->storage.first.B,len); __tmp;})
6355#define MkBuf2BOL(buf) MkBuf2XXX(BOL,1,buf)
6356#define MkBuf2I8(buf) MkBuf2XXX(I8,1,buf)
6357#define MkBuf2I16(buf) MkBuf2XXX(I16,2,buf)
6358#define MkBuf2I32(buf) MkBuf2XXX(I32,4,buf)
6359#define MkBuf2I64(buf) MkBuf2XXX(I64,8,buf)
6360#define MkBuf2FLT(buf) MkBuf2XXX(FLT,4,buf)
6361#define MkBuf2DBL(buf) MkBuf2XXX(DBL,8,buf)
6363#define MkBuf2Ptr(len,ptr,buf) memcpy((void*)ptr,buf->storage.first.B,len)
6364#define MkBuf2BOL_P(ptr,buf) MkBuf2Ptr(1,ptr,buf)
6365#define MkBuf2I8_P(ptr,buf) MkBuf2Ptr(1,ptr,buf)
6366#define MkBuf2I16_P(ptr,buf) MkBuf2Ptr(2,ptr,buf)
6367#define MkBuf2I32_P(ptr,buf) MkBuf2Ptr(4,ptr,buf)
6368#define MkBuf2I64_P(ptr,buf) MkBuf2Ptr(8,ptr,buf)
6369#define MkBuf2FLT_P(ptr,buf) MkBuf2Ptr(4,ptr,buf)
6370#define MkBuf2DBL_P(ptr,buf) MkBuf2Ptr(8,ptr,buf)
6372#define MkBuf2Ptr_A(l,a,b) memcpy(a.B##l,b->storage.first.B,l)
6373#define MkBuf2BOL_A(ato,buf) MkBuf2Ptr_A(1,ato,buf)
6374#define MkBuf2I8_A(ato,buf) MkBuf2Ptr_A(1,ato,buf)
6375#define MkBuf2I16_A(ato,buf) MkBuf2Ptr_A(2,ato,buf)
6376#define MkBuf2I32_A(ato,buf) MkBuf2Ptr_A(4,ato,buf)
6377#define MkBuf2I64_A(ato,buf) MkBuf2Ptr_A(8,ato,buf)
6378#define MkBuf2FLT_A(ato,buf) MkBuf2Ptr_A(4,ato,buf)
6379#define MkBuf2DBL_A(ato,buf) MkBuf2Ptr_A(8,ato,buf)
6410#define MkString2O(s,l,r) MkString2BOL_RT(MK_RT_CALL s,l,r)
6419#define MkString2Y(s,l,r) MkString2I8_RT(MK_RT_CALL s,l,r)
6428#define MkString2S(s,l,r) MkString2I16_RT(MK_RT_CALL s,l,r)
6437#define MkString2US(s,l,r) MkString2U16_RT(MK_RT_CALL s,l,r)
6446#define MkString2I(s,l,r) MkString2I32_RT(MK_RT_CALL s,l,r)
6455#define MkString2UI(s,l,r) MkString2U32_RT(MK_RT_CALL s,l,r)
6464#define MkString2W(s,l,r) MkString2I64_RT(MK_RT_CALL s,l,r)
6484#define MkString2F(s,l,r) MkString2FLT_RT(MK_RT_CALL s,l,r)
6493#define MkString2D(s,l,r) MkString2DBL_RT(MK_RT_CALL s,l,r)
6598#define MkBufferCreateTLS_T(cls,name,size) \
6599 static MkThreadLocal cls##R name##R = {0}; \
6600 MK_BUF name = MkBUF(&name##R); \
6601 if (unlikely(!__MkCheckX(cls,&name##R))) { \
6602 MkBufferInit(name,cls##_TT,size); \
6603 MkRefIncr_1X(name); \
6604 } else if (MkBUF_R(&name##R).var.cursize) { \
6605 MkBufferReset(name); \
6618#define MkBufferCreateTLS_inout_T(cls,name,inout) \
6619 static MkThreadLocal struct MkBufferS __hidden_##name##R = {0}; \
6620 MK_BUF name = *inout != NULL ? *inout : &__hidden_##name##R; \
6621 if (likely(!__MkCheckX(MkBufferC,name))) { \
6622 MkBufferInit(name,cls##_TT,0); \
6623 MkRefIncr_1X(name); \
6624 } else if (name->var.cursize) { \
6625 MkBufferReset(name); \
6645#define MkBufferCreateLOCAL_T(cls,name,size) \
6646 cls##R name##R = {0}; \
6647 struct MkBufferS * const name = MkBUF(&name##R); \
6648 MkBufferInit(name,cls##_TT,size)
6871 MK_I8 * const val_out
6936MK_EXTERN enum MkErrorE MK_DECL MkBufferGetLL_RT (
6939 MK_LLG * const val_out
6940) MK_ATTR_RT_INSTANCE;
6942#define MkBufferGetLLG(b,o) MkBufferGetLL(b,o)
7262#define MkBufferLogS_2V(buf,fmt) MkBufferLogS_3(buf,#fmt,MkOBJ(fmt))
7491__parser__(template-required,no-rpc,keep,no-static)
7544struct MkBufferStreamSaveS;
7547#define MkBufferStreamS_ils_size (0)
7634 #define MkBufferStreamC_SIGNATURE (MkBufferC_SIGNATURE ^ (4u<<6))
7635 #define MkBufferStreamC_MASK (((1u<<26)-1)<<6)
7643 #define MkBufferStreamC_X2bus(x) (x)
7644 #define MkBufferStreamC_X2buf(x) MkBUF(x)
7645 #define MkBufferStreamC_X2obj(x) MkOBJ(x)
7658 #define MkBufferStreamC_T (&MK_RT_REF._MkBufferStreamC_T)
7660 #define MkBufferStreamC_TT (MkTYP(MkBufferStreamC_T))
7662 #define MkBufferStreamST MkBufferStreamC_T
7664 #define MkBufferStreamSTT (MkTYP(MkBufferStreamST))
7666 #define MkBufferStreamC_type MK_BUS
7668 #define MkBufferStreamCT_X(instance) ( (struct MkTypeDefS *) (MkOBJ_R(instance).type) )
7670 #define MkBufferStreamCTT_X(instance) (MkOBJ_R(instance).type)
7672 #define MkBufferStreamCT_TT(typ) ( (struct MkTypeDefS *) (typ) )
7674 #define MkBufferStreamC_NS MK
7676 #define MkBufferStreamCTT MkBufferStreamCTT
7678 #define MkBufferStreamCT ( (struct MkTypeDefS *) MkBufferStreamCTT )
7686 #pragma GCC diagnostic push
7687 #pragma GCC diagnostic ignored "-Wattributes"
7691 __parser__(
class=MkBufferStreamC,
static,hide)
7699 __parser__(
class=MkBufferStreamC,
static,hide)
7705 #pragma GCC diagnostic pop
7706 #define MkBufferStreamC_Check(mng) MkBusCheck(mng)
7715 __parser__(
class=MkBufferStreamC,hide,
static)
7716 META_ATTRIBUTE_SANITIZE
7723 __parser__(
class=MkBufferStreamC,hide,
static)
7724 META_ATTRIBUTE_SANITIZE
7731 #define MkBusRaise(_bus) if (!_MkCheckX(MkBufferStreamC,_bus)) { \
7732 MkErrorSetC_1E("'MkBufferStreamC' hdl is NULL"); \
7737 #define MkBUS_R(x) (*(x)).super.bus
7739 #define MkBUS(x) (&MkBUS_R(x))
7758__parser__push__(doc-group=_ignore_,doc-index=Class,doc-name=Export,
class=MkBufferStreamC);
7810#define MkBufferStreamHandleResolve_e(netHdl) ({ \
7811 MK_HDL tmpHdl=netHdl; \
7816 tmp=MkBufferStreamHandleResolve(tmpHdl); \
7818 MkErrorSetC_1_NULL("ERROR: 'MkBufferStreamC' handle is 'NULL'"); \
7833 __parser__(flags=
new,doc-group=_ignore_,doc-index=Class,doc-name=Misc,
class=MkBufferStreamC,null-
return-allow)
7855#define MkBufferStream64_ils_size (64)
7887 #define MkBufferStream64C_SIGNATURE (MkBufferStreamC_SIGNATURE ^ (3u<<3))
7888 #define MkBufferStream64C_MASK (((1u<<29)-1)<<3)
7896 #define MkBufferStream64C_X2bus(x) MkBUS(x)
7897 #define MkBufferStream64C_X2buf(x) MkBUF(x)
7898 #define MkBufferStream64C_X2obj(x) MkOBJ(x)
7911 #define MkBufferStream64C_T (&MK_RT_REF._MkBufferStream64C_T)
7913 #define MkBufferStream64C_TT (MkTYP(MkBufferStream64C_T))
7915 #define MkBufferStream64ST MkBufferStream64C_T
7917 #define MkBufferStream64STT (MkTYP(MkBufferStream64ST))
7919 #define MkBufferStream64CT_X(instance) ( (struct MkTypeDefS *) (MkOBJ_R(instance).type) )
7921 #define MkBufferStream64CTT_X(instance) (MkOBJ_R(instance).type)
7923 #define MkBufferStream64CT_TT(typ) ( (struct MkTypeDefS *) (typ) )
7925 #define MkBufferStream64C_NS MK
7927 #define MkBufferStream64CTT MkBufferStream64CTT
7929 #define MkBufferStream64CT ( (struct MkTypeDefS *) MkBufferStream64CTT )
7950#define MkBufferStream256S_ils_size (256)
7982 #define MkBufferStream256C_SIGNATURE (MkBufferStreamC_SIGNATURE ^ (2u<<3))
7983 #define MkBufferStream256C_MASK (((1u<<29)-1)<<3)
7991 #define MkBufferStream256C_X2bus(x) MkBUS(x)
7992 #define MkBufferStream256C_X2buf(x) MkBUF(x)
7993 #define MkBufferStream256C_X2obj(x) MkOBJ(x)
8006 #define MkBufferStream256C_T (&MK_RT_REF._MkBufferStream256C_T)
8008 #define MkBufferStream256C_TT (MkTYP(MkBufferStream256C_T))
8010 #define MkBufferStream256ST MkBufferStream256C_T
8012 #define MkBufferStream256STT (MkTYP(MkBufferStream256ST))
8014 #define MkBufferStream256CT_X(instance) ( (struct MkTypeDefS *) (MkOBJ_R(instance).type) )
8016 #define MkBufferStream256CTT_X(instance) (MkOBJ_R(instance).type)
8018 #define MkBufferStream256CT_TT(typ) ( (struct MkTypeDefS *) (typ) )
8020 #define MkBufferStream256C_NS MK
8022 #define MkBufferStream256CTT MkBufferStream256CTT
8024 #define MkBufferStream256CT ( (struct MkTypeDefS *) MkBufferStream256CTT )
8045#define MkBufferStream1024_ils_size (1024)
8077 #define MkBufferStream1024C_SIGNATURE (MkBufferStreamC_SIGNATURE ^ (4u<<3))
8078 #define MkBufferStream1024C_MASK (((1u<<29)-1)<<3)
8086 #define MkBufferStream1024C_X2bus(x) MkBUS(x)
8087 #define MkBufferStream1024C_X2buf(x) MkBUF(x)
8088 #define MkBufferStream1024C_X2obj(x) MkOBJ(x)
8101 #define MkBufferStream1024C_T (&MK_RT_REF._MkBufferStream1024C_T)
8103 #define MkBufferStream1024C_TT (MkTYP(MkBufferStream1024C_T))
8105 #define MkBufferStream1024ST MkBufferStream1024C_T
8107 #define MkBufferStream1024STT (MkTYP(MkBufferStream1024ST))
8109 #define MkBufferStream1024CT_X(instance) ( (struct MkTypeDefS *) (MkOBJ_R(instance).type) )
8111 #define MkBufferStream1024CTT_X(instance) (MkOBJ_R(instance).type)
8113 #define MkBufferStream1024CT_TT(typ) ( (struct MkTypeDefS *) (typ) )
8115 #define MkBufferStream1024C_NS MK
8117 #define MkBufferStream1024CTT MkBufferStream1024CTT
8119 #define MkBufferStream1024CT ( (struct MkTypeDefS *) MkBufferStream1024CTT )
8140#define MkBufferStream16384S_ils_size (16384)
8172 #define MkBufferStream16384C_SIGNATURE (MkBufferStreamC_SIGNATURE ^ (1u<<3))
8173 #define MkBufferStream16384C_MASK (((1u<<29)-1)<<3)
8181 #define MkBufferStream16384C_X2bus(x) MkBUS(x)
8182 #define MkBufferStream16384C_X2buf(x) MkBUF(x)
8183 #define MkBufferStream16384C_X2obj(x) MkOBJ(x)
8196 #define MkBufferStream16384C_T (&MK_RT_REF._MkBufferStream16384C_T)
8198 #define MkBufferStream16384C_TT (MkTYP(MkBufferStream16384C_T))
8200 #define MkBufferStream16384ST MkBufferStream16384C_T
8202 #define MkBufferStream16384STT (MkTYP(MkBufferStream16384ST))
8204 #define MkBufferStream16384CT_X(instance) ( (struct MkTypeDefS *) (MkOBJ_R(instance).type) )
8206 #define MkBufferStream16384CTT_X(instance) (MkOBJ_R(instance).type)
8208 #define MkBufferStream16384CT_TT(typ) ( (struct MkTypeDefS *) (typ) )
8210 #define MkBufferStream16384C_NS MK
8212 #define MkBufferStream16384CTT MkBufferStream16384CTT
8214 #define MkBufferStream16384CT ( (struct MkTypeDefS *) MkBufferStream16384CTT )
8259#define MkBufferStreamCreate_1(size) MkBufferStreamCreate(NULL,size)
8321#define MkBufferStreamCreateLOCAL_T(cls,name,size) \
8322 cls##R name##R = {0}; \
8323 struct MkBufferStreamS * const name = cls##_X2bus(&name##R); \
8324 MkBufferStreamInit(name,cls##_TT,size)
8337#define MkBufferStreamCreateSTATIC_T(cls,name) \
8338 static cls##R name##R = {0}; \
8339 struct MkBufferStreamS * const name = cls##_X2bus(&name##R); \
8340 if (__MkCheckX(cls,&name##R)) { \
8341 MkBufferStreamReset(name); \
8343 MkBufferStreamInit(name,cls##TT,0); \
8357#define MkBufferStreamCreateTLS_T(cls,name) \
8358 static MkThreadLocal cls##R name##R = {0}; \
8359 struct MkBufferStreamS * const name = cls##_X2bus(&name##R); \
8360 if (__MkCheckX(cls,&name##R)) { \
8361 MkBufferStreamReset(name); \
8363 MkBufferStreamInit(name,cls##_TT,0); \
8542#define MkBufferStreamLog_5F(bus,fmt,...) MkBufferStreamLog(bus,MkObj(fmt),__VA_ARGS__)
8543#define MkBufferStreamLog_2F(bus,fmt) MkBufferStreamLog_5F(bus,fmt,0,__func__,0)
8544#define MkBufferStreamLog_3F(bus,fmt,pfx) MkBufferStreamLog_5F(bus,fmt,0,pfx,0)
8916 MK_I8 * const val_out
9043#include "MkBufferListC_def_mk.h"
9073#define MkDbgLogData(d) \
9074 MkDbgV_2O(MK_ERROR_FORMAT,MK_COLOR_LIGHT_CYAN "FROM=%s -> TO=%s [%d]" MK_COLOR_RESET "\n", \
9075 MK_RT_REF.log.logNAME, (d), MK_RT_REF.log.logREF);
9081 #if defined(__cplusplus)
9082 #define MkLogDataEA(e) MkLogDataS::e
9084 #define MkLogDataEA(e) e
9097 #define MkLogDataS_LogNAME_size 256
9134 #define MkLogFileC_SIGNATURE (MkObjectC_SIGNATURE ^ (3u<<10))
9135 #define MkLogFileC_MASK (((1u<<22)-1)<<10)
9143 #define MkLogFileC_X2lfl(x) (x)
9144 #define MkLogFileC_X2obj(x) MkOBJ(x)
9157 #define MkLogFileC_T (&MK_RT_REF._MkLogFileC_T)
9159 #define MkLogFileC_TT (MkTYP(MkLogFileC_T))
9161 #define MkLogFileST MkLogFileC_T
9163 #define MkLogFileSTT (MkTYP(MkLogFileST))
9165 #define MkLogFileC_type MK_LFL
9167 #define MkLogFileCT_X(instance) ( (struct MkTypeDefS *) (MkOBJ_R(instance).type) )
9169 #define MkLogFileCTT_X(instance) (MkOBJ_R(instance).type)
9171 #define MkLogFileCT_TT(typ) ( (struct MkTypeDefS *) (typ) )
9173 #define MkLogFileC_NS MK
9175 #define MkLogFileCTT MkLogFileCTT
9177 #define MkLogFileCT ( (struct MkTypeDefS *) MkLogFileCTT )
9185 #pragma GCC diagnostic push
9186 #pragma GCC diagnostic ignored "-Wattributes"
9204 #pragma GCC diagnostic pop
9205 #define MkLogFileC_Check(mng) MkLflCheck(mng)
9215 META_ATTRIBUTE_SANITIZE
9223 META_ATTRIBUTE_SANITIZE
9230 #define MkLflRaise(_lfl) if (!_MkCheckX(MkLogFileC,_lfl)) { \
9231 MkErrorSetC_1E("'MkLogFileC' hdl is NULL"); \
9236 #define MkLFL_R(x) (*(x)).super.lfl
9238 #define MkLFL(x) (&MkLFL_R(x))
9257__parser__push__(doc-group=_ignore_,doc-index=Class,doc-name=Export,
class=MkLogFileC);
9309#define MkLogFileHandleResolve_e(netHdl) ({ \
9310 MK_HDL tmpHdl=netHdl; \
9315 tmp=MkLogFileHandleResolve(tmpHdl); \
9317 MkErrorSetC_1_NULL("ERROR: 'MkLogFileC' handle is 'NULL'"); \
9332 __parser__(flags=
new,doc-group=_ignore_,doc-index=Class,doc-name=Misc,
class=MkLogFileC,null-
return-allow)
9477#define MkDbgMkExt2(c,x) mk_dbg_color_ln(c,"MkExtensionS: ptr<%p>, next<%p>, prev<%p>", (x), (x)->next, (x)->prev)
9478#define MkDbgMkExt(x) MkDbgMkExt2(MK_COLOR_CYAN,x)
9508 #define MkExtensionC_SIGNATURE (MkObjectC_SIGNATURE ^ (9u<<10))
9509 #define MkExtensionC_MASK (((1u<<22)-1)<<10)
9517 #define MkExtensionC_X2ext(x) (x)
9518 #define MkExtensionC_X2obj(x) MkOBJ(x)
9531 #define MkExtensionC_T (&MK_RT_REF._MkExtensionC_T)
9533 #define MkExtensionC_TT (MkTYP(MkExtensionC_T))
9535 #define MkExtensionST MkExtensionC_T
9537 #define MkExtensionSTT (MkTYP(MkExtensionST))
9539 #define MkExtensionC_type MK_EXT
9541 #define MkExtensionCT_X(instance) ( (struct MkTypeDefS *) (MkOBJ_R(instance).type) )
9543 #define MkExtensionCTT_X(instance) (MkOBJ_R(instance).type)
9545 #define MkExtensionCT_TT(typ) ( (struct MkTypeDefS *) (typ) )
9547 #define MkExtensionC_NS MK
9549 #define MkExtensionCTT MkExtensionCTT
9551 #define MkExtensionCT ( (struct MkTypeDefS *) MkExtensionCTT )
9559 #pragma GCC diagnostic push
9560 #pragma GCC diagnostic ignored "-Wattributes"
9578 #pragma GCC diagnostic pop
9579 #define MkExtensionC_Check(mng) MkExtCheck(mng)
9589 META_ATTRIBUTE_SANITIZE
9597 META_ATTRIBUTE_SANITIZE
9604 #define MkExtRaise(_ext) if (!_MkCheckX(MkExtensionC,_ext)) { \
9605 MkErrorSetC_1E("'MkExtensionC' hdl is NULL"); \
9610 #define MkEXT_R(x) (*(x)).super.ext
9612 #define MkEXT(x) (&MkEXT_R(x))
9625#define MkExtension_size 64
9693#define MkDbgErr_2(err,col) \
9694 mk_dbg_color_ln(col,"MkDbgErr[%p]: check<%d>, mkrt<%s>, isLocal<%d>, format_of_error<%p>", \
9695 err, MkErrCheck(err), MkDbgRtChkX(err), MkOBJ(err)->obj_protect.isLocal, err->format_of_error)
9696#define MkDbgErr(err) MkDbgErr_2(err,MK_COLOR_WHITE)
9698#if META_DEBUG & META_DEBUG_ERROR
9743 #define MkErrorC_SIGNATURE (MkObjectC_SIGNATURE ^ (4u<<10))
9744 #define MkErrorC_MASK (((1u<<22)-1)<<10)
9752 #define MkErrorC_X2err(x) (x)
9753 #define MkErrorC_X2obj(x) MkOBJ(x)
9766 #define MkErrorC_T (&MK_RT_REF._MkErrorC_T)
9768 #define MkErrorC_TT (MkTYP(MkErrorC_T))
9770 #define MkErrorST MkErrorC_T
9772 #define MkErrorSTT (MkTYP(MkErrorST))
9774 #define MkErrorC_type MK_ERR
9776 #define MkErrorCT_X(instance) ( (struct MkTypeDefS *) (MkOBJ_R(instance).type) )
9778 #define MkErrorCTT_X(instance) (MkOBJ_R(instance).type)
9780 #define MkErrorCT_TT(typ) ( (struct MkTypeDefS *) (typ) )
9782 #define MkErrorC_NS MK
9784 #define MkErrorCTT MkErrorCTT
9786 #define MkErrorCT ( (struct MkTypeDefS *) MkErrorCTT )
9794 #pragma GCC diagnostic push
9795 #pragma GCC diagnostic ignored "-Wattributes"
9813 #pragma GCC diagnostic pop
9823 META_ATTRIBUTE_SANITIZE
9831 META_ATTRIBUTE_SANITIZE
9838 #define MkErrRaise(_err) if (!_MkCheckX(MkErrorC,_err)) { \
9839 MkErrorSetC_1E("'MkErrorC' hdl is NULL"); \
9844 #define MkERR_R(x) (*(x)).super.err
9846 #define MkERR(x) (&MkERR_R(x))
9868__parser__push__(doc-group=_ignore_,doc-index=Class,doc-name=Export,
class=MkErrorC);
9920#define MkErrorHandleResolve_e(netHdl) ({ \
9921 MK_HDL tmpHdl=netHdl; \
9926 tmp=MkErrorHandleResolve(tmpHdl); \
9928 MkErrorSetC_1_NULL("ERROR: 'MkErrorC' handle is 'NULL'"); \
9943 __parser__(flags=
new,doc-group=_ignore_,doc-index=Class,doc-name=Misc,
class=MkErrorC,null-
return-allow)
9965#define MK_ERREXT_ARGS MK_RT_ARGS MK_ERR const mkerr, MK_ERREXT const errext
9966#define MK_ERREXT_CALL MK_RT_CALL err, errext
9968#define MK_ERREXT_ARGS_N MK_RT_ARGS MK_ERRN const mkerr, MK_ERREXT const errext
9969#define MK_ERREXT_CALL_N MK_RT_CALL err, errext
10060 #define MkErrExtC_SIGNATURE (MkExtensionC_SIGNATURE ^ (1u<<6))
10061 #define MkErrExtC_MASK (((1u<<26)-1)<<6)
10069 #define MkErrExtC_X2errext(x) (x)
10070 #define MkErrExtC_X2ext(x) MkEXT(x)
10071 #define MkErrExtC_X2obj(x) MkOBJ(x)
10084 #define MkErrExtC_T (&MK_RT_REF._MkErrExtC_T)
10086 #define MkErrExtC_TT (MkTYP(MkErrExtC_T))
10088 #define MkErrExtST MkErrExtC_T
10090 #define MkErrExtSTT (MkTYP(MkErrExtST))
10092 #define MkErrExtC_type MK_ERREXT
10094 #define MkErrExtCT_X(instance) ( (struct MkTypeDefS *) (MkOBJ_R(instance).type) )
10096 #define MkErrExtCTT_X(instance) (MkOBJ_R(instance).type)
10098 #define MkErrExtCT_TT(typ) ( (struct MkTypeDefS *) (typ) )
10100 #define MkErrExtC_NS MK
10102 #define MkErrExtCTT MkErrExtCTT
10104 #define MkErrExtCT ( (struct MkTypeDefS *) MkErrExtCTT )
10112 #pragma GCC diagnostic push
10113 #pragma GCC diagnostic ignored "-Wattributes"
10131 #pragma GCC diagnostic pop
10132 #define MkErrExtC_Check(mng) MkErrExtCheck(mng)
10142 META_ATTRIBUTE_SANITIZE
10150 META_ATTRIBUTE_SANITIZE
10157 #define MkErrExtRaise(_errext) if (!_MkCheckX(MkErrExtC,_errext)) { \
10158 MkErrorSetC_1E("'MkErrExtC' hdl is NULL"); \
10163 #define MkERREXT_R(x) (*(x)).super.errext
10165 #define MkERREXT(x) (&MkERREXT_R(x))
10175#define MkErrExtAdd(_mkerrR,add) do { \
10176 (_mkerrR).mkErrExt = (typeof((_mkerrR).mkErrExt)) MkExtensionAdd(MkEXT((_mkerrR).mkErrExt),MkEXT(add)); \
10178 MkERREXT_R(add).mkerrhead = &(_mkerrR); \
10181#define MkErrExtDel(_mkerrR,del) do { \
10183 (_mkerrR).mkErrExt = (typeof((_mkerrR).mkErrExt)) MkExtensionDel(MkEXT((_mkerrR).mkErrExt),MkEXT(del)); \
10184 MkERREXT_R(del).mkerrhead = NULL; \
10223 #define MkErrorPanicC_SIGNATURE (MkObjectC_SIGNATURE ^ (7u<<10))
10224 #define MkErrorPanicC_MASK (((1u<<22)-1)<<10)
10232 #define MkErrorPanicC_X2obj(x) MkOBJ(x)
10245 #define MkErrorPanicC_T (&MK_RT_REF._MkErrorPanicC_T)
10247 #define MkErrorPanicC_TT (MkTYP(MkErrorPanicC_T))
10249 #define MkErrorPanicST MkErrorPanicC_T
10251 #define MkErrorPanicSTT (MkTYP(MkErrorPanicST))
10253 #define MkErrorPanicCT_X(instance) ( (struct MkTypeDefS *) (MkOBJ_R(instance).type) )
10255 #define MkErrorPanicCTT_X(instance) (MkOBJ_R(instance).type)
10257 #define MkErrorPanicCT_TT(typ) ( (struct MkTypeDefS *) (typ) )
10259 #define MkErrorPanicC_NS MK
10261 #define MkErrorPanicCTT MkErrorPanicCTT
10263 #define MkErrorPanicCT ( (struct MkTypeDefS *) MkErrorPanicCTT )
10309 #define MkErrorExitC_SIGNATURE (MkObjectC_SIGNATURE ^ (8u<<10))
10310 #define MkErrorExitC_MASK (((1u<<22)-1)<<10)
10318 #define MkErrorExitC_X2obj(x) MkOBJ(x)
10331 #define MkErrorExitC_T (&MK_RT_REF._MkErrorExitC_T)
10333 #define MkErrorExitC_TT (MkTYP(MkErrorExitC_T))
10335 #define MkErrorExitST MkErrorExitC_T
10337 #define MkErrorExitSTT (MkTYP(MkErrorExitST))
10339 #define MkErrorExitCT_X(instance) ( (struct MkTypeDefS *) (MkOBJ_R(instance).type) )
10341 #define MkErrorExitCTT_X(instance) (MkOBJ_R(instance).type)
10343 #define MkErrorExitCT_TT(typ) ( (struct MkTypeDefS *) (typ) )
10345 #define MkErrorExitC_NS MK
10347 #define MkErrorExitCTT MkErrorExitCTT
10349 #define MkErrorExitCT ( (struct MkTypeDefS *) MkErrorExitCTT )
10395 #define MkErrorIgnoreC_SIGNATURE (MkObjectC_SIGNATURE ^ (5u<<10))
10396 #define MkErrorIgnoreC_MASK (((1u<<22)-1)<<10)
10404 #define MkErrorIgnoreC_X2obj(x) MkOBJ(x)
10417 #define MkErrorIgnoreC_T (&MK_RT_REF._MkErrorIgnoreC_T)
10419 #define MkErrorIgnoreC_TT (MkTYP(MkErrorIgnoreC_T))
10421 #define MkErrorIgnoreST MkErrorIgnoreC_T
10423 #define MkErrorIgnoreSTT (MkTYP(MkErrorIgnoreST))
10425 #define MkErrorIgnoreCT_X(instance) ( (struct MkTypeDefS *) (MkOBJ_R(instance).type) )
10427 #define MkErrorIgnoreCTT_X(instance) (MkOBJ_R(instance).type)
10429 #define MkErrorIgnoreCT_TT(typ) ( (struct MkTypeDefS *) (typ) )
10431 #define MkErrorIgnoreC_NS MK
10433 #define MkErrorIgnoreCTT MkErrorIgnoreCTT
10435 #define MkErrorIgnoreCT ( (struct MkTypeDefS *) MkErrorIgnoreCTT )
10481 #define MkErrorPrintC_SIGNATURE (MkObjectC_SIGNATURE ^ (6u<<10))
10482 #define MkErrorPrintC_MASK (((1u<<22)-1)<<10)
10490 #define MkErrorPrintC_X2obj(x) MkOBJ(x)
10503 #define MkErrorPrintC_T (&MK_RT_REF._MkErrorPrintC_T)
10505 #define MkErrorPrintC_TT (MkTYP(MkErrorPrintC_T))
10507 #define MkErrorPrintST MkErrorPrintC_T
10509 #define MkErrorPrintSTT (MkTYP(MkErrorPrintST))
10511 #define MkErrorPrintCT_X(instance) ( (struct MkTypeDefS *) (MkOBJ_R(instance).type) )
10513 #define MkErrorPrintCTT_X(instance) (MkOBJ_R(instance).type)
10515 #define MkErrorPrintCT_TT(typ) ( (struct MkTypeDefS *) (typ) )
10517 #define MkErrorPrintC_NS MK
10519 #define MkErrorPrintCTT MkErrorPrintCTT
10521 #define MkErrorPrintCT ( (struct MkTypeDefS *) MkErrorPrintCTT )
10572 #define MkErrorDefaultC_SIGNATURE (MkErrorC_SIGNATURE ^ (1u<<6))
10573 #define MkErrorDefaultC_MASK (((1u<<26)-1)<<6)
10581 #define MkErrorDefaultC_X2err(x) MkERR(x)
10582 #define MkErrorDefaultC_X2obj(x) MkOBJ(x)
10595 #define MkErrorDefaultC_T (&MK_RT_REF._MkErrorDefaultC_T)
10597 #define MkErrorDefaultC_TT (MkTYP(MkErrorDefaultC_T))
10599 #define MkErrorDefaultST MkErrorDefaultC_T
10601 #define MkErrorDefaultSTT (MkTYP(MkErrorDefaultST))
10603 #define MkErrorDefaultCT_X(instance) ( (struct MkTypeDefS *) (MkOBJ_R(instance).type) )
10605 #define MkErrorDefaultCTT_X(instance) (MkOBJ_R(instance).type)
10607 #define MkErrorDefaultCT_TT(typ) ( (struct MkTypeDefS *) (typ) )
10609 #define MkErrorDefaultC_NS MK
10611 #define MkErrorDefaultCTT MkErrorDefaultCTT
10613 #define MkErrorDefaultCT ( (struct MkTypeDefS *) MkErrorDefaultCTT )
10638#define MkERROR_R(r) ((*r).error_mk)
10639#define MkERROR MkERROR_R(&MK_RT_REF)
10640#define MkERROR_RT MkERROR_R(&MK_RT_REF)
10641#define MkERROR_O(o) MkERROR_R(MkRT_O(o))
10642#define MkERROR_X(x) MkERROR_R(MkRT_X(x))
10643#define MkERROR_XN(x) MkERROR_R(MkRT_XN(x))
10644#define MkERROR_NULL MkERROR_R(&MkRuntimeRLS)
10652#define MK_ERROR_DEFAULT_R(r) MkOBJ(&(*r).error_mk)
10653#define MK_ERROR_DEFAULT MK_ERROR_DEFAULT_R(&MK_RT_REF)
10654#define MK_ERROR_DEFAULT_X(x) MK_ERROR_DEFAULT_R(MkRT_X(x))
10655#define MK_ERROR_DEFAULT_NULL MK_ERROR_DEFAULT_R(&MkRuntimeRLS)
10672#define MK_ERROR_PANIC_R(r) MkOBJ(&(*r).error_panic)
10673#define MK_ERROR_PANIC MK_ERROR_PANIC_R(&MK_RT_REF)
10674#define MK_ERROR_PANIC_X(x) MK_ERROR_PANIC_R(MkRT_X(x))
10676#define MK_ERROR_PANIC_NULL MK_ERROR_PANIC_R(&MkRuntimeRLS)
10703#define MK_ERROR_EXIT_R(r) MkOBJ(&(*r).error_exit)
10704#define MK_ERROR_EXIT MK_ERROR_EXIT_R(&MK_RT_REF)
10705#define MK_ERROR_EXIT_X(x) MK_ERROR_EXIT_R(MkRT_X(x))
10707#define MK_ERROR_EXIT_NULL MK_ERROR_EXIT_R(&MkRuntimeRLS)
10734#define MK_ERROR_IGNORE_R(r) MkOBJ(&(*r).error_ignore)
10735#define MK_ERROR_IGNORE MK_ERROR_IGNORE_R(&MK_RT_REF)
10736#define MK_ERROR_IGNORE_X(x) MK_ERROR_IGNORE_R(MkRT_X(x))
10737#define MK_ERROR_IGNORE_XN(x) MK_ERROR_IGNORE_R(MkRT_XN(x))
10739#define MK_ERROR_IGNORE_NULL MK_ERROR_IGNORE_R(&MkRuntimeRLS)
10774#define MK_ERROR_PRINT_R(r) MkOBJ(&(*r).error_print)
10775#define MK_ERROR_PRINT MK_ERROR_PRINT_R(&MK_RT_REF)
10776#define MK_ERROR_PRINT_X(x) MK_ERROR_PRINT_R(MkRT_X(x))
10778#define MK_ERROR_PRINT_NULL MK_ERROR_PRINT_R(&MkRuntimeRLS)
10802#define MK_ERROR_FORMAT_R(r) ((*r).error_mk.format_of_error ? (*r).error_mk.format_of_error : \
10803 MkObjN((*r).error_mk.source_of_error) ? MkObjN((*r).error_mk.source_of_error) : \
10804 MK_ERROR_DEFAULT_R(r))
10805#define MK_ERROR_FORMAT MK_ERROR_FORMAT_R(&MK_RT_REF)
10806#define MK_ERROR_FORMAT_X(x) MK_ERROR_FORMAT_R(MkRT_X(x))
10808#define MK_ERROR_FORMAT_NULL MK_ERROR_FORMAT_R(&MkRuntimeRLS)
10831#define MkErrorFORMAT_1M(m) MkErrorFORMAT(MkObjN(m))
10832#define MkErrorFORMAT_1X(x) MkErrorFORMAT(MkOBJ(x))
10833#define MkErrorFORMAT_1O(o) MkErrorFORMAT(o)
10911#define MkErrorGetCodeI(e) ((*e).code)
10913#define MkErrorGetCodeE_NULL() (MkERROR_NULL.code)
10915#define MkErrorGetCode_O(o) (MkERROR_O(o).code)
10924#define MkErrorGetTextI(e) (MkBUF_R(&(*e).text).storage.first.C)
10933#define MkErrorGetSizeI(e) ((MK_SIZE)MkBUF_R(&(*e).text).var.cursize)
10942#define MkErrorGetNumI(e) ((*e).num)
10971#define MkErrorSetCONTINUE_0E() MkErrorSetCONTINUE(&MkERROR)
11100#define MkErrorCheckI(err) ((err) >= MK_ERROR)
11104#define MkErrorCheckE_0E() (MkErrorCheckI(MkErrorGetCode_0E()))
11105#define MkErrorCheckE_NULL() (MkErrorCheckI(MkErrorGetCodeE_NULL()))
11106#define MkErrorCheckE_O(o) (MkErrorCheckI(MkErrorGetCode_O(o)))
11107#define MkErrorCheckE_X(x) MkErrorCheckE_O(MkOBJ(x))
11108#define MkErrorCheckE_E(e) (MkErrorCheckI((e)->code))
11111#define MkErrorCheck(err) if (MkErrorCheckI(err)) goto error
11113#define MkErrorE_Check(err) if (MkErrorCheckI(err)) goto error
11115#define MkErrorCheck_0E() if (MkErrorCheckE_0E()) goto error
11117#define MkErrorBreak(err) if (MkErrorCheckI(err)) break
11119#define MkContinueCheck(err) switch (err) { \
11120case MK_OK: break; case MK_CONTINUE: goto cont; case MK_ERROR: goto error;\
11124#define MkErrorSwitch(PROC) switch (PROC) {\
11125case MK_OK: break; case MK_ERROR: goto error; case MK_CONTINUE: return MK_CONTINUE;\
11132#define MkErrorReturnAppend(PROC) \
11133if (MkErrorCheckI(PROC)) { \
11134 return MkErrorStack_0E (); \
11135} else if (MkErrorCheckE_0E()) { \
11136 return MkErrorReset_0E (); \
11138 return MkERROR.code; \
11142#define MkErrorReturn_2X(mngx,PROC) switch (PROC) {\
11143case MK_OK: return MK_OK; case MK_CONTINUE: return MK_CONTINUE; default: return MkErrorStack_1X (mngx);\
11146#define MkErrorReturn_1(PROC) switch (PROC) {\
11147case MK_OK: return MK_OK; case MK_CONTINUE: return MK_CONTINUE; default: return MkErrorStack_0E ();\
11150#define MkErrorReturn(PROC) MkErrorReturn_2X(META_CONTEXT_S,PROC)
11152#define check_MkErrorE(PROC) if (MkErrorCheckI(PROC))
11155#define MkErrorReturnLabel(mng) \
11158 return MkErrorStack_1M(mng);
11194#define MkPanicVL_5M(errobj,callfunc,errnum,printfmt,var_list) \
11195 MkPanicVL(MkObj(errobj),callfunc,errnum,printfmt,var_list)
11215#define MkPanicV_4M(errobj,callfunc,errnum,printfmt,...) \
11216 MkPanicV(MkObj(errobj),callfunc,errnum,printfmt,__VA_ARGS__)
11218#define MkPanicV_2M(x,printfmt,...) \
11219 MkPanicV_2(MkObj(x),printfmt,__VA_ARGS__)
11239#define MkPanicC_4M(errobj,callfunc,errnum,message) \
11240 MkPanicC(MkObj(errobj),callfunc,errnum,message)
11242#define MkPanicC_2M(x,message) MkPanicC_2(MkObj(x),message)
11258#define MkPanicDEFAULT_2M(errobj,...) MkPanicDEFAULT(MkObj(errobj),__VA_ARGS__)
11259#define MkPanicDEFAULT_1M(x) MkPanicDEFAULT_1(MkObj(x))
11265#define MkPanicSYS(mngx) do { \
11266 MkLogC_2X(mngx,"internal ERROR, please contact your local support\n"); \
11267 MkDisasterSignal(-1); \
11278) __attribute__ ((noreturn));
11407#define MkErrorSetC_1XS(message) MkErrorSetC_4M(META_CONTEXT_S,message,__func__,-1)
11408#define MkErrorSetC_2E_E(caller,message) MkErrorCheck(MkErrorSetC_2E(message,caller))
11410#define MkErrorSetC_4_NULL(...) MkErrorSetC_RT(MK_RT_NULL __VA_ARGS__)
11411#define MkErrorSetC_3_NULL(...) MkErrorSetC_4_NULL(&MkERROR_NULL,__VA_ARGS__)
11412#define MkErrorSetC_2_NULL(msg,pfx) MkErrorSetC_3_NULL(msg,pfx,-1)
11413#define MkErrorSetC_1_NULL(msg) MkErrorSetC_3_NULL(msg,__func__,-1)
11415#define MkErrorSetC_4M_NULL(m,...) MkErrorSetC_4_NULL(MkErrorFORMAT_1M(m),__VA_ARGS__)
11416#define MkErrorSetC_3M_NULL(m,msg,pfx) MkErrorSetC_4M_NULL(m,msg,pfx,-1)
11417#define MkErrorSetC_2M_NULL(m,msg) MkErrorSetC_4M_NULL(m,msg,__func__,-1)
11464#define MkErrorSetV_4EO_NULL(o,...) MkErrorSetV_NULL(MkErrorFORMAT_EO(o), __VA_ARGS__)
11465#define MkErrorSetV_4M_NULL(m,...) MkErrorSetV_NULL(MkErrorFORMAT_1M(m),__VA_ARGS__)
11466#define MkErrorSetV_2M_NULL(m,...) MkErrorSetV_4M_NULL(m,__func__,-1,__VA_ARGS__)
11467#define MkErrorSetV_2X(x,...) MkErrorSetV(MkErrorFORMAT_1X(x),__func__,-1,__VA_ARGS__)
11469#define MkErrorSetV_1_NULL(printfmt,...) \
11470 MkErrorSetV_NULL(&MkERROR_NULL,__func__,-1,printfmt,__VA_ARGS__)
11472#define MkErrorSetV_1XS(printfmt,...) \
11473 MkErrorSetV_4M(META_CONTEXT_S,__func__,-1,printfmt,__VA_ARGS__)
11475#define MkErrorSetV_2E_E(caller,printfmt,...) \
11476 MkErrorCheck(MkErrorSetV_2E(caller,printfmt,__VA_ARGS__))
11478#define MkErrorSet_ObjectIsNullError(m,printfmt,...) \
11479 MkErrorSetV_4M(m,"ObjectIsNullError",-1,printfmt,__VA_ARGS__)
11481#define MkErrorSysO(obj,cmd) \
11482 MkErrorSetV_4EO_NULL (obj, __func__, errno, \
11483 "can not '%s' -> ERR<%s>", MK_CPPXSTR(cmd), strerror (errno))
11539#define MkErrorPrintln_0() MkErrorPrintln_0E()
11561#define MkErrorLog_1EF_NULL(fmt) MkErrorLog(&MkERROR_NULL,fmt,0,__func__,0)
11562#define MkErrorLog_1EF(fmt) MkErrorLog_4E(fmt,0,__func__,0)
11623#define MkObjectErrorCatch_3X(x,...) MkObjectErrorCatch(MkOBJ(x),__VA_ARGS__)
11652 bool const force
__parser__(
default=B#
false)
11655#define MkErrorReset_0M() MkErrorReset_4M(NULL,__func__,__LINE__,0);
11656#define MkErrorResetFORCE_1(m) MkErrorReset_4M(m,__func__,__LINE__,1);
11657#define MkErrorResetFORCE_0() MkErrorReset_4M(NULL,__func__,__LINE__,1);
11659#define MkErrorReset_4X(x,...) MkErrorReset(MkErrorFORMAT_1X(x),__VA_ARGS__)
11660#define MkErrorReset_1X(x) MkErrorReset_4X(x,__func__,__LINE__,0)
11697#define MkErrorStack_1M_Check(m) (MkErrorCheckE_0E() ? MkErrorStack_1M(m) : MkErrorGetCode_0E())
11698#define MkErrorStack_0E_Check() (MkErrorCheckE_0E() ? MkErrorStack_0E() : MkErrorGetCode_0E())
11700#define MkErrorStack_4X(x,...) MkErrorStack_RT(MK_RT_CALL MkErrorFORMAT_1X(x),__VA_ARGS__)
11701#define MkErrorStack_3X(...) MkErrorStack_4X(__VA_ARGS__,__LINE__)
11702#define MkErrorStack_2X(...) MkErrorStack_4X(__VA_ARGS__,__FILE__,__LINE__)
11703#define MkErrorStack_1X(...) MkErrorStack_4X(__VA_ARGS__,__func__,__FILE__,__LINE__)
11705#define MkErrorStack_0_NULL() MkErrorStack_NULL(&MkERROR_NULL,__func__,__FILE__,__LINE__)
11707#define MkErrorStack_4X_NULL(x,...) MkErrorStack_NULL(MkErrorFORMAT_1X(x),__VA_ARGS__)
11708#define MkErrorStack_3X_NULL(...) MkErrorStack_4X_NULL(__VA_ARGS__,__LINE__)
11709#define MkErrorStack_2X_NULL(...) MkErrorStack_4X_NULL(__VA_ARGS__,__FILE__,__LINE__)
11710#define MkErrorStack_1X_NULL(...) MkErrorStack_4X_NULL(__VA_ARGS__,__func__,__FILE__,__LINE__)
11712#define MkErrorStack_NUM 50
11713#define MkErrorStack_STR "50"
11832 #define MkRtExtC_SIGNATURE (MkExtensionC_SIGNATURE ^ (2u<<6))
11833 #define MkRtExtC_MASK (((1u<<26)-1)<<6)
11841 #define MkRtExtC_X2rtext(x) (x)
11842 #define MkRtExtC_X2ext(x) MkEXT(x)
11843 #define MkRtExtC_X2obj(x) MkOBJ(x)
11856 #define MkRtExtC_T (&MK_RT_REF._MkRtExtC_T)
11858 #define MkRtExtC_TT (MkTYP(MkRtExtC_T))
11860 #define MkRtExtST MkRtExtC_T
11862 #define MkRtExtSTT (MkTYP(MkRtExtST))
11864 #define MkRtExtC_type MK_RTEXT
11866 #define MkRtExtCT_X(instance) ( (struct MkTypeDefS *) (MkOBJ_R(instance).type) )
11868 #define MkRtExtCTT_X(instance) (MkOBJ_R(instance).type)
11870 #define MkRtExtCT_TT(typ) ( (struct MkTypeDefS *) (typ) )
11872 #define MkRtExtC_NS MK
11874 #define MkRtExtCTT MkRtExtCTT
11876 #define MkRtExtCT ( (struct MkTypeDefS *) MkRtExtCTT )
11884 #pragma GCC diagnostic push
11885 #pragma GCC diagnostic ignored "-Wattributes"
11903 #pragma GCC diagnostic pop
11904 #define MkRtExtC_Check(mng) MkRtExtCheck(mng)
11914 META_ATTRIBUTE_SANITIZE
11922 META_ATTRIBUTE_SANITIZE
11929 #define MkRtExtRaise(_rtext) if (!_MkCheckX(MkRtExtC,_rtext)) { \
11930 MkErrorSetC_1E("'MkRtExtC' hdl is NULL"); \
11935 #define MkRTEXT_R(x) (*(x)).super.rtext
11937 #define MkRTEXT(x) (&MkRTEXT_R(x))
11947#define MkRtExtAdd(_mkrtR,add,id) do { \
11948 (_mkrtR).mkRtExt = (typeof((_mkrtR).mkRtExt)) MkExtensionAdd(MkEXT((_mkrtR).mkRtExt),MkEXT(add)); \
11949 MkRTEXT_R(add).mkrtHead = &(_mkrtR); \
11950 (_mkrtR).mkRtExtAry[id] = MkRTEXT(add); \
11953#define MkRtExtDel(_mkrtR,del,id) do { \
11954 (_mkrtR).mkRtExt = (typeof((_mkrtR).mkRtExt)) MkExtensionDel(MkEXT((_mkrtR).mkRtExt),MkEXT(del)); \
11955 MkRTEXT_R(del).mkrtHead = NULL; \
11956 (_mkrtR).mkRtExtAry[id] = NULL; \
12026#define MkDbgRt_1(c) mk_dbg_color_ln(c,"mkrt<%p>, MkRT<%p>", mkrt, MkRT)
12027#define MkDbgRt() MkDbgRt_1(MK_COLOR_PURPLE)
12028#define MkDbgRtChkX(x) (MkRT_X(x)==MkRT?"ok":"wrong")
12039#pragma GCC diagnostic push
12040#pragma GCC diagnostic ignored "-Wlto-type-mismatch"
12042#if defined(MK_C_BUILD_DLL)
12044 #define META_SECTION_DEFINE
12045 #include "MkRuntimeS_mk.h"
12046 #undef META_SECTION_DEFINE
12185#pragma GCC diagnostic pop
12198 #define MkRuntimeC_SIGNATURE (MkObjectC_SIGNATURE ^ (10u<<10))
12199 #define MkRuntimeC_MASK (((1u<<22)-1)<<10)
12207 #define MkRuntimeC_X2rt(x) (x)
12208 #define MkRuntimeC_X2obj(x) MkOBJ(x)
12221 #define MkRuntimeC_T (&MK_RT_REF._MkRuntimeC_T)
12223 #define MkRuntimeC_TT (MkTYP(MkRuntimeC_T))
12225 #define MkRuntimeST MkRuntimeC_T
12227 #define MkRuntimeSTT (MkTYP(MkRuntimeST))
12229 #define MkRuntimeC_type MK_RT
12231 #define MkRuntimeCT_X(instance) ( (struct MkTypeDefS *) (MkOBJ_R(instance).type) )
12233 #define MkRuntimeCTT_X(instance) (MkOBJ_R(instance).type)
12235 #define MkRuntimeCT_TT(typ) ( (struct MkTypeDefS *) (typ) )
12237 #define MkRuntimeC_NS MK
12239 #define MkRuntimeCTT MkRuntimeCTT
12241 #define MkRuntimeCT ( (struct MkTypeDefS *) MkRuntimeCTT )
12249 #pragma GCC diagnostic push
12250 #pragma GCC diagnostic ignored "-Wattributes"
12268 #pragma GCC diagnostic pop
12269 #define MkRuntimeC_Check(mng) MkRtCheck(mng)
12279 META_ATTRIBUTE_SANITIZE
12287 META_ATTRIBUTE_SANITIZE
12294 #define MkRtRaise(_rt) if (!_MkCheckX(MkRuntimeC,_rt)) { \
12295 MkErrorSetC_1E("'MkRuntimeC' hdl is NULL"); \
12319__parser__push__(doc-group=_ignore_,doc-index=Class,doc-name=Export,
class=MkRuntimeC);
12371#define MkRuntimeHandleResolve_e(netHdl) ({ \
12372 MK_HDL tmpHdl=netHdl; \
12377 tmp=MkRuntimeHandleResolve(tmpHdl); \
12379 MkErrorSetC_1_NULL("ERROR: 'MkRuntimeC' handle is 'NULL'"); \
12394 __parser__(flags=
new,doc-group=_ignore_,doc-index=Class,doc-name=Misc,
class=MkRuntimeC,null-
return-allow)
12420#define MkRT (&MkRuntimeRLS)
12421#define MkRT_R (MkRuntimeRLS)
12424 #define MkRT_O(o) ((o) && (*o).objRt ? (*o).objRt : MkRuntimeGet())
12425 #define MkRT_X(x) ((x) && MkOBJ_R(x).objRt ? MkOBJ_R(x).objRt : MkRuntimeGet())
12426 #define MkRT_ONN(o) ((*o).objRt)
12427 #define MkRT_ON(o) ( (*o).objRt ? (*o).objRt : MkRuntimeGet())
12428 #define MkRT_XN(x) ( MkOBJ_R(x).objRt ? MkOBJ_R(x).objRt : MkRuntimeGet())
12430 #define MkRT_O(o) MkRT
12431 #define MkRT_X(x) MkRT
12432 #define MkRT_ONN(o) MkRT
12433 #define MkRT_ON(o) MkRT
12434 #define MkRT_XN(x) MkRT
12438 #define MkRtSetup_O(o) MK_RT_UNUSED MK_RT const mkrt = MkRT_O(o)
12439 #define MkRtSetup_X(x) MK_RT_UNUSED MK_RT const mkrt = MkRT_X(x)
12440 #define MkRtSetup_XN(x) MK_RT_UNUSED MK_RT const mkrt = MkRT_XN(x)
12441 #define MkRtSetup_ON(o) MK_RT_UNUSED MK_RT const mkrt = MkRT_ON(o)
12442 #define MkRtSetup_NULL MK_RT_UNUSED MK_RT const mkrt = MkRuntimeGet()
12443 #define MkRtSetup_RT(r) MK_RT_UNUSED MK_RT const mkrt = r
12444 #define MkRtSetupFromRtExt(rtx) MK_RT_UNUSED MK_RT const mkrt = MkRTEXT_R(rtx).mkrtHead
12447 #define MkRtSetup_O_RT(o) if (mkrt == NULL) mkrt = MkRT_O(o)
12448 #define MkRtSetup_ON_RT(o) if (mkrt == NULL) mkrt = MkRT_ON(o)
12449 #define MkRtSetup_X_RT(x) if (mkrt == NULL) mkrt = MkRT_X(x)
12450 #define MkRtSetup_XN_RT(x) if (mkrt == NULL) mkrt = MkRT_XN(x)
12451 #define MkRtSetup_NULL_RT if (mkrt == NULL) mkrt = MkRuntimeGet()
12453 #define AllRtSetup_O(o) MkRtSetup_O(o)
12454 #define AllRtSetup_ON(o) MkRtSetup_ON(o)
12455 #define AllRtSetup_X(x) MkRtSetup_X(x)
12456 #define AllRtSetup_XN(x) MkRtSetup_XN(x)
12457 #define AllRtSetup_NULL MkRtSetup_NULL
12459 #define MkRtSetup_O(o)
12460 #define MkRtSetup_X(x)
12461 #define MkRtSetup_XN(x)
12462 #define MkRtSetup_ON(o)
12463 #define MkRtSetup_NULL
12464 #define MkRtSetup_RT(r)
12466 #define MkRtSetup_O_RT(o)
12467 #define MkRtSetup_X_RT(x)
12468 #define MkRtSetup_XN_RT(x)
12469 #define MkRtSetup_ON_RT(o)
12470 #define MkRtSetup_NULL_RT
12472 #define AllRtSetup_O(o)
12473 #define AllRtSetup_ON(o)
12474 #define AllRtSetup_X(x)
12475 #define AllRtSetup_XN(x)
12476 #define AllRtSetup_NULL
12542 #define MkRuntimeCallbackS_ident_size 30
12752#define MkRuntimeLogBufferPush() MkLogDataS saveLogTarget = MkRuntimeLogTargetPush_RT(MK_RT_CALL "BUFFER")
12761#define MkRuntimeLogBufferPop() MkRuntimeLogTargetPop_RT(MK_RT_CALL saveLogTarget)
13044 #define MK_EMBEDDED(type,call,...) ({ \
13045 type ret = (type) 0; \
13046 if (MkErrorCheckI(call (__VA_ARGS__,&ret))) goto error; \
13051#ifndef MK_EMBEDDED_REF
13053 #define MK_EMBEDDED_REF(type,call,...) ({ \
13055 if (MkErrorCheckI(call (__VA_ARGS__,&ret))) goto error; \
13177__parser__push__(doc-name=Introspection,doc-index=Class,
class=MkBufferListC,no-rpc,null-
return-allow,flags=
new);
13212__parser__push__(doc-name=Introspection,doc-index=Class,
class=MkBufferC,no-rpc,null-
return-allow,flags=
new);
13247__parser__push__(doc-name=Introspection,doc-index=Class,
class=MkBufferStreamC,no-rpc,null-
return-allow,flags=
new);
13282__parser__push__(doc-name=Introspection,doc-index=Class,
class=MkErrorC,no-rpc,null-
return-allow,flags=
new);
13317__parser__push__(doc-name=Introspection,doc-index=Class,
class=MkLogFileC,no-rpc,null-
return-allow,flags=
new);
13352__parser__push__(doc-name=Introspection,doc-index=Class,
class=MkObjectC,no-rpc,null-
return-allow);
13387__parser__push__(doc-name=Introspection,doc-index=Class,
class=MkRuntimeC,no-rpc,null-
return-allow,flags=
new);
13490 assert(self_out != NULL);
13500 if (self != NULL) {
13502 MkErrorSetV_2M(obj,
"RefCount Error: object '%s' has 'self' but 'refCout <= 0", obj->type->type_name);
13511 if (self == NULL) {
13512 MkErrorSetV_2M(obj,
"Error: '%s->SelfCreate' return a NULL pointer", obj->type->type_name);
13543#define MkObjectToError_1X(obj) MkObjectToError(MkOBJ(obj))
#define MkLogDataS_LogNAME_size
append to logFILE, valid values are: stderr, stdout or a filename (default: stderr)
#define MkCacheS_MkCacheItemS_size
#define MkCacheS_name_size
#define MkTypeS_name_size
static MK_OBJ MkObjectInstancesOfType_RT(MK_RT mkrt, MK_SIG typeSIG)
return the head-instance from a specific type defined by signature typeSIG …
#define MkRuntimeCallbackS_ident_size
#define MkBuffer1024S_ils_size
1024 bytes I)instance L)ocal S)torage - the memory that adds the final-class to the abstract-class.
#define MkBuffer256S_ils_size
256 bytes I)instance L)ocal S)torage - the memory that adds the final-class to the abstract-class.
#define MkBuffer64S_ils_size
64 bytes I)instance L)ocal S)torage - the memory that adds the final-class to the abstract-class.
MK_NUM MkBufferPush_RT(MK_RT mkrt, MK_BUF const buf, MK_STRN const val)
add str to the MkBufferC …
enum MkErrorE MkBufferToObject_RT(MK_RT mkrt, MK_BUF const buf, MK_NAT_OBJECT *obj_out)
return the native language object from a MkBufferC …
MK_BUF MkBufferAppendC_RT(MK_RT mkrt, MK_BUF const buf, MK_STRN const val)
append a single string to a MkBufferC object …
MK_I32 MkBufferAppendV_RT(MK_RT mkrt, MK_BUF const buf, MK_FST const printfmt,...)
append a single string with format and ... arguments to a MkBuffer64S …
MK_I32 MkBufferAppendVL_RT(MK_RT mkrt, MK_BUF const buf, MK_FST const printfmt, va_list var_list)
append a single string with format and var_list arguments to a MkBuffer64S …
MK_BUF MkBufferAppendStringR_RT(MK_RT mkrt, MK_BUF const buf, MkStringR const val)
append a single string to a MkBufferC object …
MK_NUM MkBufferPop_RT(MK_RT mkrt, MK_BUF const buf, MK_STRN const val)
delete str from the MkBufferC …
#define MkBufferS_ils_size
64 bytes I)instance L)ocal S)torage - the memory that adds the final-class to the abstract-class.
static MK_BUF MkBufferNext(MK_BUF const buf)
get next instance from linked-list of MkBufferS type
static MK_BUF MkBufferInstances_RT(MK_RT mkrt)
get head-instance from linked-list of MkBufferS type …
static MK_BUF MkBufferGetNull(void)
Null-Slot - return a MkBufferC typed NULL instance …
static MK_BUF MkBufferHandleResolve_RT(MK_RT mkrt, MK_HDL const netHdl)
Handle-Resolve-Slot - return a MkBufferC from netHdl or MK_NULL if invalid…
static MK_HDL MkBufferHandleGet_RT(MK_RT mkrt, MK_BUF const buf)
Handle-Get-Slot - returns a export-hdl to the MkBufferC useable for external storage
static MK_BUF MkBufferPrev(MK_BUF const buf)
get previous instance from linked-list of MkBufferS type
static MK_BUF MkBuf(MK_MNG mng)
cast a unknown-object into an MkBufferS pointer or NULL if not possible
static bool MkBufCheckO(MK_OBJN obj)
check MkBufferS -> MkObjectS::signature …
#define MkBufferC_X2obj(x)
static bool MkBufCheck(MK_MNGN mng)
check MkBufferS -> MkObjectS::signature …
#define MkBufferC_TT
class as MkTypeS-class-type, useable in a class-macro as: class##_TT …
static MK_BUFN MkBufN(MK_MNGN mng)
(const) cast a unknown-object into an MkBufferS pointer or NULL if not possible
enum MkErrorE MkBufferGetI64_RT(MK_RT mkrt, MK_BUFN const buf, MK_I64 *const val_out)
get a val_out from a MkBufferC …
enum MkErrorE MkBufferGetDBL_RT(MK_RT mkrt, MK_BUFN const buf, MK_DBL *const val_out)
get a val_out from a MkBufferC …
enum MkErrorE MkBufferGetBOOL_RT(MK_RT mkrt, MK_BUFN const buf, MK_BOOL *const val_out)
get a val_out from a MkBufferC …
enum MkErrorE MkBufferGetFLT_RT(MK_RT mkrt, MK_BUFN const buf, MK_FLT *const val_out)
get a val_out from a MkBufferC …
enum MkErrorE MkBufferGetBIN_RT(MK_RT mkrt, MK_BUFN const buf, MkBinaryR *const val_out)
get a val_out from a MkBufferC …
enum MkErrorE MkBufferGetSTR_RT(MK_RT mkrt, MK_BUFN const buf, MK_STRN *const val_out)
get a val_out from a MkBufferC …
enum MkErrorE MkBufferGetBOL_RT(MK_RT mkrt, MK_BUFN const buf, MK_BOL *const val_out)
get a val_out from a MkBufferC …
enum MkErrorE MkBufferGetU32_RT(MK_RT mkrt, MK_BUFN const buf, MK_U32 *const val_out)
get a val_out from a MkBufferC …
enum MkErrorE MkBufferGetI32_RT(MK_RT mkrt, MK_BUFN const buf, MK_I32 *const val_out)
get a val_out from a MkBufferC …
enum MkErrorE MkBufferGetLONG_RT(MK_RT mkrt, MK_BUFN const buf, MK_LONG *const val_out)
get a val_out from a MkBufferC …
enum MkErrorE MkBufferGetI8_RT(MK_RT mkrt, MK_BUFN const buf, MK_I8 *const val_out)
get a val_out from a MkBufferC …
enum MkErrorE MkBufferGetU16_RT(MK_RT mkrt, MK_BUFN const buf, MK_U16 *const val_out)
get a val_out from a MkBufferC …
enum MkErrorE MkBufferGetI16_RT(MK_RT mkrt, MK_BUFN const buf, MK_I16 *const val_out)
get a val_out from a MkBufferC …
enum MkErrorE MkBufferGetBUF_RT(MK_RT mkrt, MK_BUF const buf, MK_BUF *const val_out)
get a val_out from a MkBufferC …
enum MkErrorE MkBufferGetStringR_RT(MK_RT mkrt, MK_BUFN const buf, MkStringR *const val_out)
get a val_out from a MkBufferC …
enum MkErrorE MkBufferGetBFL_RT(MK_RT mkrt, MK_BUFN const buf, MK_BFL *const val_inout)
function to read an MkBufferListC from an MkBufferC object …
bool MkBufferIsLocal_RT(MK_RT mkrt, MK_BUFN const buf)
Check if the MkBufferC is local (temporary), not local mean global …
enum MkTypeE MkBufferGetType2_RT(MK_RT mkrt, MK_BUFN const buf)
return the MkTypeE from a MkBufferC …
void MkBufferLog_RT(MK_RT mkrt, MK_BUFN const buf, MK_OBJN fmtobj, MK_DBG const debug, MK_STRN const callfunc, MK_I32 const lvl)
log the MkBufferC …
MK_STRB MkBufferGetType1_RT(MK_RT mkrt, MK_BUFN const buf)
return the type from a MkBufferC as single character value …
MK_STRN MkBufferGetType3_RT(MK_RT mkrt, MK_BUFN const buf)
return the type from a MkBufferC as single character string …
void MkBufferLogSS_RT(MK_RT mkrt, MK_BUFN const buf, MK_STRN const varname, MK_OBJN fmtobj, MK_STRN const callfunc)
log the whole MkBufferC object to the MkLogFileC (default: stderr) …
void MkBufferLogS_RT(MK_RT mkrt, MK_BUFN const buf, MK_STRN const varname, MK_OBJN fmtobj, MK_STRN const callfunc)
log the short MkBufferC object data to the MkLogFileC (default: stderr) …
enum MkErrorE MkBufferCastTo_RT(MK_RT mkrt, MK_BUF const buf, enum MkTypeE const typ)
change the type of an MkBufferC to type …
MK_I32 MkBufferCmp_RT(MK_RT mkrt, MK_BUFN const buf1, MK_BUFN const buf2)
compare TWO MkBufferC objects like strcmp do it for strings …
MK_STRN MkBufferToString_RT(MK_RT mkrt, MK_BUFN const inst)
String-Slot - returns the string representation of the inst …
MK_BUF MkBufferTemp_RT(MK_RT mkrt, MK_BUFN const buf)
create a temporary copy of the MkBufferC buf …
MK_BUF MkBufferSizeNew_RT(MK_RT mkrt, MK_BUF const buf, MK_NUM const size)
alloc min size storage to the buf …
void MkBufferResetFull_RT(MK_RT mkrt, MK_BUF const buf)
reset a MkBufferC to the length zero and free allocated storage…
MK_BUF MkBufferCopy_RT(MK_RT mkrt, MK_BUF const buf, MK_BUFN const srce)
copy the MkBufferC from srce to dest …
MK_BUF MkBufferReset_RT(MK_RT mkrt, MK_BUF const buf)
reset a MkBufferC to the length zero …
MK_BUF MkBufferSizeAdd_RT(MK_RT mkrt, MK_BUF const buf, MK_NUM const size)
add size storage to the buf …
MK_BUF MkBufferSetI8_RT(MK_RT mkrt, MK_BUF const buf, MK_I8 const val)
Set the MkBufferC to the val …
MK_BUF MkBufferSetBinaryR_RT(MK_RT mkrt, MK_BUF const buf, MkBinaryR const val)
Set the MkBufferC to the val …
MK_BUF MkBufferSetV_RT(MK_RT mkrt, MK_BUF const buf, MK_FST const val,...)
set the MkBufferC using a ... value …
MK_BUF MkBufferSetI16_RT(MK_RT mkrt, MK_BUF const buf, MK_I16 const val)
Set the MkBufferC to the val …
MK_BUF MkBufferSetSTR_RT(MK_RT mkrt, MK_BUF const buf, MK_STRN const val)
Set the MkBufferC to the val …
MK_BUF MkBufferSetBIN_RT(MK_RT mkrt, MK_BUF const buf, MkBinaryR const val)
Set the MkBufferC to the val …
MK_BUF MkBufferSetDBL_RT(MK_RT mkrt, MK_BUF const buf, MK_DBL const val)
Set the MkBufferC to the val …
MK_BUF MkBufferSetFLT_RT(MK_RT mkrt, MK_BUF const buf, MK_FLT const val)
Set the MkBufferC to the val …
MK_BUF MkBufferSetI32_RT(MK_RT mkrt, MK_BUF const buf, MK_I32 const val)
Set the MkBufferC to the val …
MK_BUF MkBufferSetVL_RT(MK_RT mkrt, MK_BUF const buf, MK_FST const val, va_list var_list)
set the MkBufferC using a va_list value …
MK_BUF MkBufferSetBOL_RT(MK_RT mkrt, MK_BUF const buf, MK_BOL const val)
Set the MkBufferC to the val …
MK_BUF MkBufferSetStringR_RT(MK_RT mkrt, MK_BUF const buf, MkStringR const val)
Set the MkBufferC to the val …
MK_BUF MkBufferSetI64_RT(MK_RT mkrt, MK_BUF const buf, MK_I64 const val)
Set the MkBufferC to the val …
MK_BUF MkBufferSetBUF_RT(MK_RT mkrt, MK_BUF const buf, MK_BUFN const val)
Set the MkBufferC to the val …
MK_BUF MkBufferMerge_RT(MK_RT mkrt, MK_BUF const buf)
Merge-Constructor - create a new MkBufferC as a merge from an existing object …
MK_BUF MkBufferCreateSTR_RT(MK_RT mkrt, MK_STRN const val)
Constructor - create a new MkBufferC with an PRIMITIVE TYPE …
MK_BUF MkBufferCreateI8_RT(MK_RT mkrt, MK_I8 const val)
Constructor - create a new MkBufferC with an PRIMITIVE TYPE …
#define MkBufferCreateLOCAL_T(cls, name, size)
create an new MkBufferC object as L)ocal S)torage…
MK_BUF MkBufferCreateBOL_RT(MK_RT mkrt, MK_BOL const val)
Constructor - create a new MkBufferC with an PRIMITIVE TYPE …
MK_BUF MkBufferCreateI64_RT(MK_RT mkrt, MK_I64 const val)
Constructor - create a new MkBufferC with an PRIMITIVE TYPE …
MK_BUF MkBufferCreateI32_RT(MK_RT mkrt, MK_I32 const val)
Constructor - create a new MkBufferC with an PRIMITIVE TYPE …
MK_BUF MkBufferCreate64_RT(MK_RT mkrt, MK_NUM const size)
call the BufferCreate with default type MkBuffer64S (64 byte) …
#define MkBufferCreateTLS_inout_T(cls, name, inout)
Constructs a MkBufferC instance as T)hread L)ocal S)torage OR reuse inout if possible…
MK_BUF MkBufferCreate256_RT(MK_RT mkrt, MK_NUM const size)
call the BufferCreate with default type MkBuffer256S (256 byte) …
MK_BUF MkBufferCreate_RT(MK_RT mkrt, MK_TYP type, MK_NUM const size)
Constructor - create a new MkBufferC with minimum size of internal storage …
MK_BUF MkBufferCreateI16_RT(MK_RT mkrt, MK_I16 const val)
Constructor - create a new MkBufferC with an PRIMITIVE TYPE …
void MkBufferInit_RT(MK_RT mkrt, MK_BUF const buf, MK_TYP type, MK_NUM const size)
initialize or free an MkBufferC reference-instance …
#define MkBufferCreateTLS_T(cls, name, size)
create an new MkBufferC object as T)hread L)ocal S)torage…
MK_BUF MkBufferDup_RT(MK_RT mkrt, MK_BUFN const buf)
Dup-Constructor - create a new MkBufferC instance as copy from an existing MkBufferC instance
MK_BUF MkBufferCreateDBL_RT(MK_RT mkrt, MK_DBL const val)
Constructor - create a new MkBufferC with an PRIMITIVE TYPE …
void MkBufferFree_RT(MK_RT mkrt, MK_BUF const buf)
initialize or free an MkBufferC reference-instance …
MK_BUF MkBufferCreateFLT_RT(MK_RT mkrt, MK_FLT const val)
Constructor - create a new MkBufferC with an PRIMITIVE TYPE …
MK_BUF MkBufferCreateTLS_RT(MK_RT mkrt, MK_STRN const tlsName, bool const resetB)
same as BufferCreate but require no cleanup
void MkBufferDelete_RT(MK_RT mkrt, MK_BUF const buf)
Destructor - delete a MkBufferC instance …
MK_BUF MkBufferCreateBIN_RT(MK_RT mkrt, MkBinaryR const val)
Constructor - create a new MkBufferC with an PRIMITIVE TYPE …
MK_BUF MkBufferCreate1024_RT(MK_RT mkrt, MK_NUM const size)
call the BufferCreate with default type MkBuffer1024S (1024 byte) …
MK_BUF MkBufferCreateBUF_RT(MK_RT mkrt, MK_BUFN const val)
Constructor - create a new MkBufferC with an PRIMITIVE TYPE …
static MK_BFL MkBufferListNext(MK_BFL const bfl)
get next instance from linked-list of MkBufferListS type
static MK_BFL MkBufferListPrev(MK_BFL const bfl)
get previous instance from linked-list of MkBufferListS type
static MK_BFL MkBufferListInstances_RT(MK_RT mkrt)
get head-instance from linked-list of MkBufferListS type …
#define MkBufferListC_TT
class as MkTypeS-class-type, useable in a class-macro as: class##_TT …
#define MkBufferListC_X2obj(x)
#define MkBufferStream1024_ils_size
1024 bytes I)instance L)ocal S)torage - the memory that adds the final-class to the abstract-class.
#define MkBufferStream16384S_ils_size
16384 bytes I)instance L)ocal S)torage - the memory that adds the final-class to the abstract-class.
#define MkBufferStream256S_ils_size
256 bytes I)instance L)ocal S)torage - the memory that adds the final-class to the abstract-class.
#define MkBufferStream64_ils_size
64 bytes I)instance L)ocal S)torage - the memory that adds the final-class to the abstract-class.
#define MkBufferStreamS_ils_size
64 bytes I)instance L)ocal S)torage - the memory that adds the final-class to the abstract-class.
static MK_HDL MkBufferStreamHandleGet_RT(MK_RT mkrt, MK_BUS const bus)
Handle-Get-Slot - returns a export-hdl to the MkBufferStreamC useable for external storage
static MK_BUS MkBufferStreamNext(MK_BUS const bus)
get next instance from linked-list of MkBufferStreamS type
static MK_BUS MkBufferStreamGetNull(void)
Null-Slot - return a MkBufferStreamC typed NULL instance …
static MK_BUS MkBufferStreamInstances_RT(MK_RT mkrt)
get head-instance from linked-list of MkBufferStreamS type …
static MK_BUS MkBufferStreamPrev(MK_BUS const bus)
get previous instance from linked-list of MkBufferStreamS type
static MK_BUS MkBufferStreamHandleResolve_RT(MK_RT mkrt, MK_HDL const netHdl)
Handle-Resolve-Slot - return a MkBufferStreamC from netHdl or MK_NULL if invalid…
static MK_BUS MkBus(MK_MNG mng)
cast a unknown-object into an MkBufferStreamS pointer or NULL if not possible
#define MkBufferStreamC_X2obj(x)
static MK_BUSN MkBusN(MK_MNGN mng)
(const) cast a unknown-object into an MkBufferStreamS pointer or NULL if not possible
static bool MkBusCheck(MK_MNGN mng)
check MkBufferStreamS -> MkObjectS::signature …
#define MkBufferStreamC_TT
class as MkTypeS-class-type, useable in a class-macro as: class##_TT …
static bool MkBusCheckO(MK_OBJN obj)
check MkBufferStreamS -> MkObjectS::signature …
MK_BFL MkBufferStreamToBFL_RT(MK_RT mkrt, MK_BUSN const bus)
convert the bus into a MkBufferListC …
MK_BUS MkBufferStreamCopy_RT(MK_RT mkrt, MK_BUS const bus, MK_BUSN const src)
copy the MkBufferStreamC from src to bus …
MK_BUS MkBufferStreamReset_RT(MK_RT mkrt, MK_BUS const bus)
reset a MkBufferStreamC to the length zero …
void MkBufferStreamLog_RT(MK_RT mkrt, MK_BUS const bus, MK_OBJN fmtobj, MK_DBG const debug, MK_STRN const callfunc, MK_I32 const lvl)
log the MkBufferStreamC …
void MkBufferStreamPosToStart_RT(MK_RT mkrt, MK_BUS const bus)
set the current-access-position to the start of MkBufferStreamC …
void MkBufferStreamResetFull_RT(MK_RT mkrt, MK_BUS const bus)
reset a MkBufferStreamC to the length zero and free allocated storage…
void MkBufferStreamLogS_RT(MK_RT mkrt, MK_BUS const bus, MK_OBJ fmtobj, MK_STRN const callfunc)
MK_STRN MkBufferStreamToString_RT(MK_RT mkrt, MK_BUSN const inst)
String-Slot - returns the string representation of the inst …
enum MkErrorE MkBufferStreamReadI8_RT(MK_RT mkrt, MK_BUS const bus, MK_I8 *const val_out)
read a val_out from the MkBufferStreamC …
enum MkErrorE MkBufferStreamReadI64_RT(MK_RT mkrt, MK_BUS const bus, MK_I64 *const val_out)
read a val_out from the MkBufferStreamC …
enum MkErrorE MkBufferStreamReadBUF_RT(MK_RT mkrt, MK_BUS const bus, MK_BUF *const val_out)
read a val_out from the MkBufferStreamC …
enum MkErrorE MkBufferStreamReadI32_RT(MK_RT mkrt, MK_BUS const bus, MK_I32 *const val_out)
read a val_out from the MkBufferStreamC …
enum MkErrorE MkBufferStreamReadFLT_RT(MK_RT mkrt, MK_BUS const bus, MK_FLT *const val_out)
read a val_out from the MkBufferStreamC …
enum MkErrorE MkBufferStreamReadLONG_RT(MK_RT mkrt, MK_BUS const bus, MK_LONG *const val_out)
read the long native object from the MkBufferStreamC …
enum MkErrorE MkBufferStreamReadBFL_RT(MK_RT mkrt, MK_BUS const bus, MK_BFL *const val_out)
read a MkBufferListC from the MkBufferStreamC …
enum MkTypeE MkBufferStreamReadGetNextType_RT(MK_RT mkrt, MK_BUSN const bus)
get the type (MkTypeE) of the next Item in the MkBufferStreamC or "0" if not available
enum MkErrorE MkBufferStreamReadSTR_RT(MK_RT mkrt, MK_BUS const bus, MK_STRN *const val_out)
read a val_out from the MkBufferStreamC …
enum MkErrorE MkBufferStreamReadUndo_RT(MK_RT mkrt, MK_BUS const bus)
undo the last MkBufferStreamC READ function call …
bool MkBufferStreamReadItemExists_RT(MK_RT mkrt, MK_BUSN const bus)
check if an item exists in the read-data-package …
enum MkErrorE MkBufferStreamReadNEXT_RT(MK_RT mkrt, MK_BUS const bus, MK_NAT_OBJECT *const val_out)
enum MkErrorE MkBufferStreamReadL_START_RT(MK_RT mkrt, MK_BUS const bus, MK_BUF buf)
START read a list-item-type from the MkBufferStreamC …
enum MkErrorE MkBufferStreamReadBIN_RT(MK_RT mkrt, MK_BUS const bus, MkBinaryR *const val_out)
read a val_out from the MkBufferStreamC …
enum MkErrorE MkBufferStreamReadL_END_RT(MK_RT mkrt, MK_BUS const bus)
END read a list-item-type from the MkBufferStreamC …
MK_NUM MkBufferStreamReadGetNumItems_RT(MK_RT mkrt, MK_BUSN const bus)
get the number of items left in the MkBufferStreamC …
enum MkErrorE MkBufferStreamReadDBL_RT(MK_RT mkrt, MK_BUS const bus, MK_DBL *const val_out)
read a val_out from the MkBufferStreamC …
enum MkErrorE MkBufferStreamReadALL_RT(MK_RT mkrt, MK_BUS const bus, MK_BFL *const val_inout)
get a temporary MkBufferListC from all data in the MkBufferStreamC …
enum MkErrorE MkBufferStreamReadLIST_RT(MK_RT mkrt, MK_BUS const bus, MK_NAT_LIST *const val_out)
enum MkErrorE MkBufferStreamReadBOL_RT(MK_RT mkrt, MK_BUS const bus, MK_BOL *const val_out)
read a val_out from the MkBufferStreamC …
MK_BUS MkBufferStreamCreate1024_RT(MK_RT mkrt, MK_NUM const size)
call the BufferStreamCreate with default type MkBufferStream1024S (1024 byte) …
MK_BUS MkBufferStreamDup_RT(MK_RT mkrt, MK_BUSN const src)
Dup-Constructor - create a new MkBufferStreamC instance as copy from an existing MkBufferStreamC inst...
void MkBufferStreamDelete_RT(MK_RT mkrt, MK_BUS const bus)
Destructor - delete a MkBufferStreamC instance …
MK_BUS MkBufferStreamCreate64_RT(MK_RT mkrt, MK_NUM const size)
call the BufferStreamCreate with default type MkBufferStream64S (64 byte) …
MK_BUS MkBufferStreamCreate16384_RT(MK_RT mkrt, MK_NUM const size)
call the BufferStreamCreate with default type MkBufferStream16384S (16384 byte) …
MK_BUS MkBufferStreamMerge_RT(MK_RT mkrt, MK_BUS const bus)
Merge-Constructor - create a new MkBufferStreamC as a merge from an existing object …
void MkBufferStreamInit_RT(MK_RT mkrt, MK_BUS const bus, MK_TYP type, MK_NUM const size)
init and free a MkBufferStreamS reference
MK_BUS MkBufferStreamCreate_RT(MK_RT mkrt, MK_TYP type, MK_NUM const size)
create and initialize an MkBufferStreamC instance …
#define MkBufferStreamCreateSTATIC_T(cls, name)
Constructs a MkBufferStreamC instance as S)tatic S)torage …
MK_BUS MkBufferStreamCreateTLS_RT(MK_RT mkrt, MK_STRN const tlsName, bool const resetB)
same as BufferStreamCreate but require no cleanup …
void MkBufferStreamFree_RT(MK_RT mkrt, MK_BUS const bus)
init and free a MkBufferStreamS reference
#define MkBufferStreamCreateTLS_T(cls, name)
Constructs a MkBufferStreamC instance as T)hread L)ocal S)torage …
MK_BUS MkBufferStreamCreate256_RT(MK_RT mkrt, MK_NUM const size)
call the BufferStreamCreate with default type MkBufferStream256S (256 byte) …
#define MkBufferStreamCreateLOCAL_T(cls, name, size)
Constructs a MkBufferStreamC instance as L)ocal S)torage …
enum MkErrorE MkBufferStreamWriteL_FLAT_RT(MK_RT mkrt, MK_BUS const bus, MK_BFL const bfl)
write a MkBufferListC FLAT into the MkBufferStreamC …
enum MkErrorE MkBufferStreamWriteBIN_RT(MK_RT mkrt, MK_BUS const bus, MkBinaryR const val)
write a PRIMITIVE TYPE into the MkBufferStreamC …
enum MkErrorE MkBufferStreamWriteI32_RT(MK_RT mkrt, MK_BUS const bus, MK_I32 const val)
write a PRIMITIVE TYPE into the MkBufferStreamC …
enum MkErrorE MkBufferStreamWriteDBL_RT(MK_RT mkrt, MK_BUS const bus, MK_DBL const val)
write a PRIMITIVE TYPE into the MkBufferStreamC …
enum MkErrorE MkBufferStreamWriteL_END_RT(MK_RT mkrt, MK_BUS const bus)
END write a list-item-type into the MkBufferStreamC …
enum MkErrorE MkBufferStreamWriteFLT_RT(MK_RT mkrt, MK_BUS const bus, MK_FLT const val)
write a PRIMITIVE TYPE into the MkBufferStreamC …
enum MkErrorE MkBufferStreamWriteHDL_RT(MK_RT mkrt, MK_BUS const bus, MK_I32 const val)
write the handle into the MkBufferStreamC …
enum MkErrorE MkBufferStreamWriteV_RT(MK_RT mkrt, MK_BUS const bus, MK_STRN const fmt,...)
write format-string into the MkBufferStreamC …
enum MkErrorE MkBufferStreamWriteVL_RT(MK_RT mkrt, MK_BUS const bus, MK_STRN const fmt, va_list ap)
write format-string into the MkBufferStreamC …
enum MkErrorE MkBufferStreamWriteBOL_RT(MK_RT mkrt, MK_BUS const bus, MK_BOL const val)
write a PRIMITIVE TYPE into the MkBufferStreamC …
enum MkErrorE MkBufferStreamWriteL_START_RT(MK_RT mkrt, MK_BUS const bus)
START write a list-item-type into the MkBufferStreamC …
enum MkErrorE MkBufferStreamWriteBFL_RT(MK_RT mkrt, MK_BUS const bus, MK_BFLN const bfl)
write a MkBufferListC into the MkBufferStreamC …
enum MkErrorE MkBufferStreamWriteLONG_RT(MK_RT mkrt, MK_BUS const bus, MK_LONG const val)
write the long native object into the MkBufferStreamC …
enum MkErrorE MkBufferStreamWriteSTR_RT(MK_RT mkrt, MK_BUS const bus, MK_STRN const val, MK_NUM const len)
write a PRIMITIVE TYPE into the MkBufferStreamC …
enum MkErrorE MkBufferStreamWriteBUS_FLAT_RT(MK_RT mkrt, MK_BUS const bus, MK_BUSN const add)
write a MkBufferStreamC into the MkBufferStreamC …
enum MkErrorE MkBufferStreamWriteI64_RT(MK_RT mkrt, MK_BUS const bus, MK_I64 const val)
write a PRIMITIVE TYPE into the MkBufferStreamC …
enum MkErrorE MkBufferStreamWriteBUF_RT(MK_RT mkrt, MK_BUS const bus, MK_BUFN const val)
write a PRIMITIVE TYPE into the MkBufferStreamC …
enum MkErrorE MkBufferStreamWriteI8_RT(MK_RT mkrt, MK_BUS const bus, MK_I8 const val)
write a PRIMITIVE TYPE into the MkBufferStreamC …
MK_OBJN(* MkErrorFormatOfF)(MK_ERREXT_ARGS_N, int const dummy)
void(* MkErrorPanikF)(MK_ERREXT_ARGS_N, MK_OBJN const errobj, MK_STRN const prefix, MK_I32 const errnum, MK_STRN const fmt, va_list ap)
MK_OBJN const errobj because of MK_ERROR_FORMAT value.
bool(* MkErrorSetVLF)(MK_ERREXT_ARGS, MK_OBJN const fmtobj, MK_STRN const)
void(* MkErrorLogF)(MK_ERREXT_ARGS_N, MK_OBJN const, MK_DBG const, MK_STRN const, MK_I32 const, MK_STRN const, MK_OBJ const)
bool(* MkErrorAppendFLT)(MK_ERREXT_ARGS, MK_OBJN const fmtobj)
void(* MkErrorResetF)(MK_ERREXT_ARGS, MK_OBJN const fmtobj)
bool(* MkErrorResetOnExitF)(MK_ERREXT_ARGS, MK_OBJN const fmtobj)
void(* MkErrorSetRF)(MK_ERREXT_ARGS, MK_MNGN const errctx, MK_OBJN const fmtobj)
void(* MkErrorSetEF)(MK_ERREXT_ARGS, MK_ERREXT const newerr, MK_OBJN const fmtobj)
void(* MkErrorInit)(MK_ERREXT_ARGS, MK_OBJN const fmtobj)
static MK_ERREXTN MkErrExtN(MK_MNGN mng)
(const) cast a unknown-object into an MkErrExtS pointer or NULL if not possible
static bool MkErrExtCheckO(MK_OBJN obj)
check MkErrExtS -> MkObjectS::signature …
static MK_ERREXT MkErrExt(MK_MNG mng)
cast a unknown-object into an MkErrExtS pointer or NULL if not possible
static bool MkErrExtCheck(MK_MNGN mng)
check MkErrExtS -> MkObjectS::signature …
static MK_ERR MkErrorNext(MK_ERR const err)
get next instance from linked-list of MkErrorS type
static MK_ERR MkErrorGetNull(void)
Null-Slot - return a MkErrorC typed NULL instance …
static MK_ERR MkErrorPrev(MK_ERR const err)
get previous instance from linked-list of MkErrorS type
static MK_ERR MkErrorHandleResolve_RT(MK_RT mkrt, MK_HDL const netHdl)
Handle-Resolve-Slot - return a MkErrorC from netHdl or MK_NULL if invalid…
static MK_HDL MkErrorHandleGet_RT(MK_RT mkrt, MK_ERR const err)
Handle-Get-Slot - returns a export-hdl to the MkErrorC useable for external storage
static MK_ERR MkErrorInstances_RT(MK_RT mkrt)
get head-instance from linked-list of MkErrorS type …
#define MkErrorC_X2obj(x)
static MK_ERRN MkErrN(MK_MNGN mng)
(const) cast a unknown-object into an MkErrorS pointer or NULL if not possible
static bool MkErrCheck(MK_MNGN mng)
check MkErrorS -> MkObjectS::signature …
static MK_ERR MkErr(MK_MNG mng)
cast a unknown-object into an MkErrorS pointer or NULL if not possible
static bool MkErrCheckO(MK_OBJN obj)
check MkErrorS -> MkObjectS::signature …
#define MkErrorC_TT
class as MkTypeS-class-type, useable in a class-macro as: class##_TT …
MK_I32 MkErrorGetNum(MK_ERRN const err)
get the MkErrorS::num. The number can be used as exit-code …
#define MkErrorGetSizeI(e)
get the error-message-size from the exception-object …
#define MkErrorGetCodeI(e)
get the value of MkErrorS::code …
MK_STRN MkErrorGetText(MK_ERRN const err)
get the MkErrorS::text …
MK_SIZE MkErrorGetSize(MK_ERRN const err)
get the error-message-size from the exception-object …
#define MkErrorGetTextI(e)
get the MkErrorS::text …
#define MkErrorGetNumI(e)
get the MkErrorS::num. The number can be used as exit-code …
enum MkErrorE MkErrorGetCode(MK_ERRN const err)
get the value of MkErrorS::code …
void MkErrorStackFormat_RT(MK_RT mkrt, MK_ERR const err, MK_STRN callfunc, MK_STRN callfile, MK_I32 const callline)
append an ensemble of func, file and line to the error-message …
void MkErrorCleanup_RT(MK_RT mkrt, MK_ERR const err, MK_STRN const callfunc, MK_I32 const callline)
cleanup and print unwanted active error …
void MkErrorPrintln_RT(MK_RT mkrt, MK_ERR const err, MK_STRN const msg, MK_STRN const callfunc, MK_I32 const callline)
print the default-error to the MkLogFileC (default: stderr) and clear the error afterwards …
MK_STRN MkErrorToString_RT(MK_RT mkrt, MK_ERRN const inst)
String-Slot - returns the string representation of the inst …
enum MkErrorE MkErrorReset_RT(MK_RT mkrt, MK_ERR const err, MK_STRN const callfunc, MK_I32 const callline, bool const force)
This function clears the err and resets to MK_OK …
void MkErrorLog_RT(MK_RT mkrt, MK_ERRN const err, MK_OBJN fmtobj, MK_DBG const debug, MK_STRN const callfunc, MK_I32 const lvl)
log the error to MkLogFileC (default: stderr) …
MK_ERR MkErrorCatch_RT(MK_RT mkrt, MK_ERR const err, MK_EXP const exception, MK_STRN const callfunc)
convert a programming-language-error into an libmkkernel error …
enum MkErrorE MkErrorStack_RT(MK_RT mkrt, MK_ERR const err, MK_STRN const callfunc, MK_STRN const callfile, MK_I32 const callline)
check on error and if yes append an ErrorStackFormat to the error-message …
enum MkErrorE MkErrorRaise_RT(MK_RT mkrt, MK_ERRN const err)
convert an libmkkernel error into an programming-language-error and raise afterwards....
MK_ERR MkErrorNoRaise_RT(MK_RT mkrt, MK_ERR const err)
ignore the next return of MK_ERROR and do not raise an target-language-exception …
void MkDisasterSignal(MK_I32 signal)
called if something get REALLY wrong …
void MkPanicC_RT(MK_RT mkrt, MK_OBJN fmtobj, MK_STRN const callfunc, MK_I32 const errnum, MK_STRN const message)
do a panic with string as argument …
enum MkErrorE MkErrorSetVL_RT(MK_RT mkrt, MK_ERR err, MK_STRN const callfunc, MK_I32 const errnum, MK_FST const printfmt, va_list var_list)
'set' and 'raise' the MkErrorC using a vararg-list message …
enum MkErrorE MkErrorSetE_RT(MK_RT mkrt, MK_ERR const err, MK_ERR const newerr)
set the MkErrorC from a MkErrorC copy and raise an error …
#define MkErrorSetV_2M(err, printfmt,...)
enum MkErrorE MkErrorSetC_RT(MK_RT mkrt, MK_ERR err, MK_STRN const message, MK_STRN const callfunc, MK_I32 const errnum)
'set' and 'raise' the MkErrorC using a string-message and a errnum-number …
enum MkErrorE MkErrorSetV_RT(MK_RT mkrt, MK_ERR err, MK_STRN const callfunc, MK_I32 const errnum, MK_FST const printfmt,...)
set the MkErrorS object using a format string argument list and raise an error …
void MkErrorAppendC_RT(MK_RT mkrt, MK_ERR const err, MK_STRN const message)
append the message to the MkErrorS::text …
void MkPanicV_RT(MK_RT mkrt, MK_OBJN fmtobj, MK_STRN const callfunc, MK_I32 const errnum, MK_FST const printfmt,...)
do a panic with a vararg as argument …
void MkErrorAppendV_RT(MK_RT mkrt, MK_ERR const err, MK_FST const printfmt,...)
append a vararg string to the MkErrorC …
void MkErrorAppendVL_RT(MK_RT mkrt, MK_ERR const err, MK_FST const printfmt, va_list var_list)
append a va_list string to the MkErrorC …
void MkPanicVL_RT(MK_RT mkrt, MK_OBJN fmtobj, MK_STRN const callfunc, MK_I32 const errnum, MK_FST const printfmt, va_list var_list)
do a panic with a vararg-list as argument …
enum MkErrorE MkErrorSetR_RT(MK_RT mkrt, MK_ERR const err, MK_STRN const message, enum MkErrorE const errcode, MK_I32 const errnum, MK_MNG const errctx)
set the MkErrorC and raise the error …
void MkPanicDEFAULT_RT(MK_RT mkrt, MK_OBJN fmtobj, MK_STRN const callfunc) MK_NO_RETURN
make panic from MkErrorDEFAULT_RT …
bool MkErrorIsSOCKET(MK_ERRN const err)
check on SOCKET-DOWN error …
bool MkErrorIsABORT(MK_ERRN const err)
check on ABORT signal …
enum MkErrorE MkErrorSetEXIT_RT(MK_RT mkrt, MK_ERR const err, MK_STRN const callfunc)
finish the current callback, return to toplevel and MqExit the application …
enum MkErrorE MkErrorSetSOCKET_RT(MK_RT mkrt, MK_ERR const err, MK_STRN const detail, MK_STRN const callfunc)
create SOCKET-DOWN error …
bool MkErrorIsEXIT(MK_ERR const err)
check on APPLICATION-EXIT error …
void MkErrorSetCONTINUE_RT(MK_RT mkrt, MK_ERR const err)
signal end of processing in an MqMqEventIF callback …
bool MkErrorIsTIMEOUT(MK_ERRN const err)
check on TIMEOUT error …
enum MkErrorE MkErrorSetABORT_RT(MK_RT mkrt, MK_ERR const err, MK_STRN const detail, MK_STRN const callfunc)
send the ABORT signal to the calling stack…
void MkErrorSetCode_RT(MK_RT mkrt, MK_ERR const err, enum MkErrorE code)
set the MkErrorS::code value …
static MK_ERR MkErrorPANIC_RT(MK_RT mkrt)
panic-system-error - panic on next error …
static MK_ERR MkErrorDEFAULT_RT(MK_RT mkrt)
default-system-error - default-error …
#define MkErrorFORMAT_1O(o)
static MK_ERR MkErrorPRINT_RT(MK_RT mkrt)
ignore-system-error - print the next error into MkLogFileC …
MK_ERR MkErrorFORMAT(MK_OBJN fmtobj)
system-error-format - format and return the default-error …
static MK_ERR MkErrorIGNORE_RT(MK_RT mkrt)
ignore-system-error - ignore the next error …
static MK_ERR MkErrorEXIT_RT(MK_RT mkrt)
panic-system-error - panic on next error …
MK_ERR MkErrorFORMAT_EO(MK_OBJN fmtobj)
same as (static,runtime) MK_ERR MkErrorDEFAULT() but do not set the MkERROR.format_of_error attribute...
void MkErrorDelete_RT(MK_RT mkrt, MK_ERR err)
Destructor - delete a MkErrorS object …
MK_ERR MkErrorDup_RT(MK_RT mkrt, MK_ERRN const srce)
Dup-Constructor - create a new MkErrorC instance as copy from an existing MkErrorC instance …
void MkErrorCopy_RT(MK_RT mkrt, MK_ERR dest, MK_ERRN const srce)
Copy-Constructor - sync an existing MkErrorC instance with the values from an existing MkErrorC insta...
MK_ERR MkExceptionCatch(MK_MNG const expobj, MK_EXP const exception, MK_STRN const callfunc)
convert an Target-Programming-Language (TPL) exception into an MkErrorC …
void MkExceptionRaise(MK_MNG const expobj, MK_STRN const callfunc, MK_I32 const callline)
convert an MkErrorC into a Target-Programming-Language (TPL) exception …
bool MkExceptionCheck(MK_EXP exception)
Checks if Exception is of type MkExceptionC and returns MK_YES or MK_NO …
#define MkExtension_size
maximum number of runtime-extensions useable in a theKernel software.
MK_EXT MkExtensionDel_RT(MK_RT mkrt, MK_EXT head, MK_EXT del)
this is an update to head, use: head = MkExtensionDel(head, del)
struct MkExtensionS MkExtensionS
Base class for the extension technologie …
bool MkExtensionDeleteAll_RT(MK_RT mkrt, MK_EXT head)
MK_EXT MkExtensionAdd_RT(MK_RT mkrt, MK_EXT head, MK_EXT add)
this is an update to head, use: head = MkExtensionAdd(head, add)
static bool MkExtCheck(MK_MNGN mng)
check MkExtensionS -> MkObjectS::signature …
static MK_EXT MkExt(MK_MNG mng)
cast a unknown-object into an MkExtensionS pointer or NULL if not possible
static MK_EXTN MkExtN(MK_MNGN mng)
(const) cast a unknown-object into an MkExtensionS pointer or NULL if not possible
static bool MkExtCheckO(MK_OBJN obj)
check MkExtensionS -> MkObjectS::signature …
static MK_SIZE MkBinaryGetSize(const MkBinaryR bin)
get size from the binary ...
static MK_BINN MkBinaryGetData(const MkBinaryR bin)
get data pointer from the binary ...
static MkBinaryR MkBinaryDup_RT(MK_RT mkrt, const MkBinaryR bin)
create a binary as duplicate from an already existsing MkBinaryR ...
static bool MkBinaryIsNull(const MkBinaryR bin)
check if binary is NULL ...
static void MkBinaryLog_RT(MK_RT mkrt, const MkBinaryR bin)
get size from the binary ...
static MkBinaryR MkBinaryCreate(MK_SIZE size, MK_BINN data)
create a binary from data and size ...
static const MkBinaryR MkBinaryCreateSlice(const MkBinaryR bin, MK_SIZE start, MK_SIZE wide)
create a binary slice ...
MK_PTR(* MkCacheCF)(MK_RT mkrt, MK_PTR const)
void(* MkCacheDF)(MK_RT mkrt, MK_PTR *const)
void * MK_MACRO_TYP
helper-type used to declare a prototype for a macro
#define MK_NULL_STR
the string "MK_NULL" value as MK_NULL_STR …
#define MK_PARSER_fmtobj
use param_fmtobj for documentation
#define MK_NO_RETURN
dosable "MK_NO_RETURN" because C# require "return" from "MqExit" for thread-pool support
static bool MK_NULL_STR_OR_EMPTY_CHECK_1(char const *const __str)
same as MK_NULL_STR_CHECK together with "" check but without len parameter
static bool MK_NULL_STR_CHECK_1(char const *const __str)
same as MK_NULL_STR_CHECK but without len parameter
#define MK_EXTERN
static library
#define MK_UNUSED
mark unnused variables and functions
static bool MK_NULL_STR_CHECK(char const *const __str, const long int __len)
check if __str is MK_NULL_STR return true or false …
#define MK_NULL
The Programming-Language-Micro-Kernel (PLMK) NULL value as MK_NULL in C …
#define MK_NULL_STR_LEN
the integer strlen("MK_NULL") value as MK_NULL_STR_LEN …
MK_STRN MkTimeoutE_ToString(enum MkTimeoutE value)
return the MkTimeoutE as string …
MkTimeoutE
Predefined Timeout values …
MkBoolE
the internal boolean …
#define MK_TYPE_IS_1_I8E
the type is native and has a size of 1 byte …
enum MkErrorE MkIdSE_FromInt(MK_I32 const value, enum MkIdSE *value_out)
return the MkIdSE from integer …
static MK_I32 MkTypeE_ToInt(enum MkTypeE value)
return the MkTypeE as integer …
enum MkErrorE MkNativeIsE_FromInt(MK_I32 const value, enum MkNativeIsE *value_out)
return the MkNativeIsE from integer …
#define MK_TYPE_IS_2_I8E
the type is native and has a size of 2 bytes …
static MK_I32 MkErrorE_ToInt(enum MkErrorE value)
return the MkErrorE as integer …
#define MK_TYPE_SHIFT
FIXED: type is only 8bit -> 4 bit=15 for type and 4 bit for flag …
MK_STRN MkNativeIsE_ToString(enum MkNativeIsE value)
return the MkNativeIsE as string …
static MK_I32 MkTimeoutE_ToInt(enum MkTimeoutE value)
return the MkTimeoutE as integer …
enum MkErrorE MkTypeE_FromInt(MK_I32 const value, enum MkTypeE *value_out)
return the MkTypeE from integer …
static MK_I32 MkBoolE_ToInt(enum MkBoolE value)
return the MkBoolE as integer …
MK_STRN MkBoolE_ToString(enum MkBoolE value)
return the MkBoolE as string …
#define MK_TYPE_IS_8_I8E
the type is native and has a size of 8 bytes …
MK_STRN MkIdSE_ToString(enum MkIdSE value)
return the MkIdSE as string …
static MK_I32 MkIdSE_ToInt(enum MkIdSE value)
return the MkIdSE as integer …
enum MkErrorE MkErrorE_FromInt(MK_I32 const value, enum MkErrorE *value_out)
return the MkErrorE from integer …
enum MkErrorE MkTimeoutE_FromInt(MK_I32 const value, enum MkTimeoutE *value_out)
return the MkTimeoutE from integer …
static MK_I32 MkNativeIsE_ToInt(enum MkNativeIsE value)
return the MkNativeIsE as integer …
#define MK_TYPE_IS_4_I8E
the type is native and has a size of 4 bytes …
MK_STRN MkTypeE_ToString(enum MkTypeE value)
return the MkTypeE as string …
MkErrorE
collection for the different error-codes …
MkNativeIsE
define if data is string or little or big endian …
enum MkErrorE MkBoolE_FromInt(MK_I32 const value, enum MkBoolE *value_out)
return the MkBoolE from integer …
MkTypeE
basic data-types supported by Programming-Language-Micro-Kernel (PLMK) …
MK_STRN MkErrorE_ToString(enum MkErrorE value)
return the MkErrorE as string …
@ MK_TIMEOUT_LONG
long timeout in sec (180 sec) …
@ MK_TIMEOUT_VERYSHORT
very short timeout in sec (5 sec) …
@ MK_TIMEOUT_INIT
maximum timeout in sec (900 sec) …
@ MK_TIMEOUT_MAX
request the maximum possible (infinite) timeout value …
@ MK_TIMEOUT_NORMAL
normal timeout in sec (90 sec) …
@ MK_TIMEOUT_USER
request the user defined timeout value from the –timeout configuration value …
@ MK_TIMEOUT_SOCKET
shorter timeout in sec (10 sec) … This TIMEOUT is used for socket connection with 'connect'
@ MK_TIMEOUT_SHORT
short timeout in sec (20 sec) …
@ MK_TIMEOUT_DEFAULT
request the default timeout value …
@ MK_ERROR
(persistent) raise an error-event, the calling-fucntion is interrupted.
@ MK_CONTINUE
(transient) raise an continue-event, the calling-function must handle this.
@ MK_OK
(persistent) everything is OK.
@ MK_NATIVE_IS_INITIAL
0 = initial value
@ MK_NATIVE_IS_STRING
S = using of the string protocol.
@ MK_NATIVE_IS_LITTLE
L = using if the binary protocoll, data in little-edian.
@ MK_NATIVE_IS_BIG
B = using if the binary protocoll, data in big-endian.
@ MK_I8T
Y: 1 byte 'byte' type.
@ MK_I64T
W: 8 byte 'long long int' type.
@ MK_FLTT
F: 4 byte 'float' type.
@ MK_BINT
B: X byte 'byte-array' type.
@ MK_I16T
S: 2 byte 'short' type.
@ MK_BOLT
O: 1 byte 'boolean' type.
@ MK_DBLT
D: 8 byte 'double' type.
@ MK_I32T
I: 4 byte 'int' type.
@ MK_STRT
C: X byte 'string' type (e.g. with a \0 at the end)
@ MK_LSTT
L: X byte 'list' type.
MK_BFL MkKernelGetTypeList_RT(MK_RT mkrt)
return a list of all types defind in the Programming-Language-Micro-Kernel (PLMK) …
#define __parser__global__(...)
parser: apply an attribute to a dunction in global scope …
#define __parser__pop__
parser: stop apply a list of local attributes to a block of code …
#define __parser__push__(...)
parser: start apply a list of local attributes to a block of code …
#define __parser__(...)
parser: apply an attribute to an object in local scope …
void MkSetup(void)
setup libmkkernel internal memory …
void MkCleanup(void)
cleanup libmkkernel internal memory …
bool MkCleanupActive
signal that code was triggert by MkCleanup
static void MkStringSplit(MkStringR strR, MK_NUM *len_out, MK_STRN *str_out)
split a str into ptr and len …
enum MkErrorE MkString2U16_RT(MK_RT mkrt, MK_STRN const str, MK_NUM const length, MK_U16 *val_out)
enum MkErrorE MkString2BOOL_RT(MK_RT mkrt, MK_STRN const str, MK_NUM const length, MK_BOOL *val_out)
static MK_STRN MkStringGetData(MkStringR const str)
get ptr pointer from the string ...
enum MkErrorE MkString2I8_RT(MK_RT mkrt, MK_STRN const str, MK_NUM const length, MK_I8 *val_out)
enum MkErrorE MkString2I16_RT(MK_RT mkrt, MK_STRN const str, MK_NUM const length, MK_I16 *val_out)
enum MkErrorE MkString2ATO_RT(MK_RT mkrt, MK_STRN const str, MK_NUM const length, enum MkTypeE type, MK_ATO *val_out)
enum MkErrorE MkString2I64_RT(MK_RT mkrt, MK_STRN const str, MK_NUM const length, MK_I64 *val_out)
enum MkErrorE MkString2LONG_RT(MK_RT mkrt, MK_STRN const str, MK_NUM const length, MK_LONG *val_out)
enum MkErrorE MkString2FLT_RT(MK_RT mkrt, MK_STRN const str, MK_NUM const length, MK_FLT *val_out)
static MkStringR MkStringSlice(MkStringR strR, MK_NUM start, MK_NUM len)
create a slice of strR start at start with max len bytes …
enum MkErrorE MkString2HDL_RT(MK_RT mkrt, MK_STRN const str, MK_NUM const length, MK_HDL *val_out)
static MkStringR MkStringCreate_1(MK_STRN str)
create a str from ptr use MK_NULL as end-of-string ...
static MkStringR MkStringDup_RT(MK_RT mkrt, MkStringR const str)
create a string as duplicate from an already existsing MkBinaryR ...
enum MkErrorE MkString2U32_RT(MK_RT mkrt, MK_STRN const str, MK_NUM const length, MK_U32 *val_out)
static MkStringR MkStringCreate(MK_NUM len, MK_STRN str)
create a str from ptr and len ...
enum MkErrorE MkString2DBL_RT(MK_RT mkrt, MK_STRN const str, MK_NUM const length, MK_DBL *val_out)
enum MkErrorE MkString2I32_RT(MK_RT mkrt, MK_STRN const str, MK_NUM const length, MK_I32 *val_out)
static void MkStringLog_RT(MK_RT mkrt, MkStringR const str, MK_STRN func)
log the string ...
static MK_NUM MkStringGetSize(MkStringR const str)
get len from the string ...
static bool MkStringIsNULL(MkStringR const strR)
check if strR is MK_NULL_STR return true or false …
enum MkErrorE MkString2BOL_RT(MK_RT mkrt, MK_STRN const str, MK_NUM const length, MK_BOL *val_out)
convert a string into a native
const MK_PTRB * MK_MNGN
const - a managed object pointer, datatype will be checked at runtime
int32_t MK_NUM
array size data-type ('num' items in array …
float MK_FLT
4 byte float data-type
MK_PTRB * MK_PTR
generic pointer data-type
const MK_STRB * MK_STRN
constant string pointer data-type
MK_LSTB * MK_LST
list pointer data-type
MK_PTRB * MK_MNG
managed object pointer, datatype will be checked at runtime
MK_PTRB const * MK_EXP
exception object pointer
const MK_PTRB * MK_PTRN
const generic pointer data-type
unsigned int MK_SIG
signature datatype
MK_STRB const * MK_FST
const format string pointer data-type
char MK_STRB
string type data-type
unsigned long long MK_U64
MK_PTRB * MK_CBP
generic pointer to call-back data
MK_UNUSED static const MK_STRN_A MK_STRN_A_NULL
MK_BINB * MK_BIN
byte-array pointer data-type with binary encoding (MK_BINN)
signed char MK_I8
1 byte byte data-type
MK_PTRB * MK_MXP
MkExceptionC object pointer.
unsigned char MK_BINB
byte-array type data-type
unsigned char MK_LSTB
list type data-type
signed long long MK_I64
8 byte wide integer data-type
bool MK_BOOL
real bool data-type
MK_STRB * MK_STR
string pointer data-type with UTF8 ecoding (MK_STR)
unsigned char MK_BOL
1 byte boolean data-type
void MK_PTRB
pointer type data-type
MK_PTRB * MK_CCP
class constructor/destructor data type
void(* MkMarkF)(MK_RT mkrt, MK_PTR data)
prototype for a Garbage-Collection mark function …
long MK_LONG
4/8 byte long data-type
signed short int MK_I16
2 byte short data-type
double MK_DBL
8 byte double data-type
int32_t MK_HDL
4 byte int handle data-type
MK_BINB const * MK_BINN
const byte-array pointer data-type
signed int MK_I32
4 byte integer data-type
int MK_DBG
debug-level data-type …
struct MkLogDataS MkLogDataS
struct to hold the mkrt-logging-data …
static MK_HDL MkLogFileHandleGet_RT(MK_RT mkrt, MK_LFL const lfl)
Handle-Get-Slot - returns a export-hdl to the MkLogFileC useable for external storage
static MK_LFL MkLogFilePrev(MK_LFL const lfl)
get previous instance from linked-list of MkLogFileS type
static MK_LFL MkLogFileInstances_RT(MK_RT mkrt)
get head-instance from linked-list of MkLogFileS type …
static MK_LFL MkLogFileHandleResolve_RT(MK_RT mkrt, MK_HDL const netHdl)
Handle-Resolve-Slot - return a MkLogFileC from netHdl or MK_NULL if invalid…
static MK_LFL MkLogFileNext(MK_LFL const lfl)
get next instance from linked-list of MkLogFileS type
static MK_LFL MkLogFileGetNull(void)
Null-Slot - return a MkLogFileC typed NULL instance …
#define MkLogFileC_TT
class as MkTypeS-class-type, useable in a class-macro as: class##_TT …
#define MkLogFileC_X2obj(x)
static MK_LFLN MkLflN(MK_MNGN mng)
(const) cast a unknown-object into an MkLogFileS pointer or NULL if not possible
static bool MkLflCheckO(MK_OBJN obj)
check MkLogFileS -> MkObjectS::signature …
static MK_LFL MkLfl(MK_MNG mng)
cast a unknown-object into an MkLogFileS pointer or NULL if not possible
static bool MkLflCheck(MK_MNGN mng)
check MkLogFileS -> MkObjectS::signature …
void MkLogFileClose_RT(MK_RT mkrt, MK_LFL lfh)
Destructor - delete a MkLogFileC instance …
enum MkErrorE MkLogFileOpen_RT(MK_RT mkrt, MK_OBJN fmtobj, MK_STRN const file, MK_LFL *lfh_out)
open the log-file in append mode …
enum MkErrorE MkLogFileWriteVL_RT(MK_RT mkrt, MK_LFLN lfl, MK_FST printfmt, va_list var_list)
write to log-file …
enum MkErrorE MkLogFileGetFile_RT(MK_RT mkrt, MK_LFLN lfl, MK_STRN *file_out)
get the log-file …
enum MkErrorE MkLogFileWriteV_RT(MK_RT mkrt, MK_LFLN lfl, MK_FST printfmt,...)
write to log-file …
enum MkErrorE MkLogFileWriteC_RT(MK_RT mkrt, MK_LFLN lfl, MK_STRN text)
write to log-file …
void(* MkTypeInitF)(MK_RT mkrt, MK_TYP const type)
MK_OBJ(* MkDup2F)(MK_RT mkrt, MK_OBJN const obj, MK_STRN const ident)
void(* MkSelfDeleteF)(MK_RT mkrt, MK_PTR self, MK_PTR const env)
MK_OBJ(* MkResetF)(MK_RT mkrt, MK_OBJ const obj)
void(* MkSelfUnlinkF)(MK_RT mkrt, MK_PTR self, MK_PTR const env)
MK_OBJ(* MkCopyF)(MK_RT mkrt, MK_OBJ const obj, MK_OBJN const src)
MK_PTR(* MkAllocCreateFLT)(MK_RT mkrt, MK_TYP const type)
void(* MkAllocDeleteF)(MK_RT mkrt, MK_TYP const type, MK_PTR ptr)
#define __MkCheckX(cls, x)
MK_OBJ(* MkDupF)(MK_RT mkrt, MK_OBJN const obj)
MK_STRN(* MkToStringF)(MK_RT mkrt, MK_OBJN const obj)
MK_OBJ(* MkMergeF)(MK_RT mkrt, MK_OBJ const obj)
void(* MkDestructorF)(MK_RT mkrt, MK_OBJ const obj)
MK_OBJ(* MkConstructorF)(MK_RT mkrt, MK_TYP type, MK_PTR nat, MK_PTR lnk)
void(* MkLogF)(MK_RT mkrt, MK_OBJN const obj, MK_OBJN fmt, MK_DBG const debug, MK_STRN const callfunc, MK_I32 const lvl)
bool(* MkLogFormatF)(MK_RT mkrt, char *header, MK_SIZE const headerSize, MK_OBJN const obj, MK_STRN const caller, MK_I32 const debug, MK_STRN const fmt)
#define MkSanitizeCheck(_root, _m)
#define MkDbgDeepWriter(...)
MK_PTR(* MkSelfCreateF)(MK_RT mkrt, MK_OBJ const obj, MK_PTR const env)
#define MkSanitizeCheckO(_root, _o)
MK_OBJ MkObjectHandleResolve_RT(MK_RT mkrt, MK_HDL const netHdl)
Handle-Resolve-Slot - return a MkObjectC from netHdl or MK_NULL if invalid…
void MkObjectHandleDeleteByNetHdl_RT(MK_RT mkrt, MK_HDL const netHdl)
Handle-Delete-Slot - delete a netHdl from handle-storage …
#define MkObjectHandleResolve(...)
#define MkObjectHandleGet(...)
static MK_HDL MkObjectHandleGetOfType(MK_OBJ const obj)
Export-Slot - returns typeHdl of the obj .
static MK_OBJ MkObjectGetNull(void)
Null-Slot - return a MkObjectC typed NULL instance …
static MK_OBJ MkObjectPrev(MK_OBJ const obj)
get previous instance from linked-list of MkObjectS type
static MK_OBJ MkObjectNext(MK_OBJ const obj)
get next instance from linked-list of MkObjectS type
static MK_OBJ MkObjectInstances_RT(MK_RT mkrt)
get head-instance from linked-list of MkObjectS type …
void MkObjectHandleDelete_RT(MK_RT mkrt, MK_OBJ const netObj)
Handle-Delete-Slot - delete a netObj from handle-storage …
struct MkObjectS * MK_OBJ
class-shortcut for struct MkObjectS *, all shortcut using the XX_YYY syntax (only for public API) …
MK_HDL MkObjectHandleGet_RT(MK_RT mkrt, MK_OBJ const obj)
Handle-Get-Slot - returns a export-hdl to the MkObjectC useable for external storage
MK_HDL MkObjectHandleGetOr0(MK_OBJ const obj)
return export-hdl or 0 in not created…
bool MkObjectHandleExists(MK_OBJ const obj)
check if obj has already a handle defined…
static MK_OBJN MkObjN(MK_MNGN mng)
(const) cast a unknown-object into an MkObjectS pointer or NULL if not possible
static bool MkObjCheckO(MK_OBJN obj)
check MkObjectS -> MkObjectS::signature …
#define MkObjectC_X2obj(x)
#define MkOBJ(x)
cast a known-object into an MkObjectS pointer
#define MkObjectC_TT
class as MkTypeS-class-type, useable in a class-macro as: class##_TT …
static bool MkObjCheck(MK_MNGN mng)
check MkObjectS -> MkObjectS::signature …
static MK_OBJ MkObj(MK_MNG mng)
cast a unknown-object into an MkObjectS pointer or NULL if not possible
void MkDbgLogC_RT(MK_RT mkrt, MK_OBJN const obj, MK_STRN const callfunc)
debug: write a short-obj-summary to MkLogFileC (default: stderr) …
void MkDbgM_RT(MK_RT mkrt, MK_STRN const message, MK_DBG const debug, MK_STRN const callfunc, MK_I32 const lvl)
debug: write a static-marker to the MkLogFileC (default: stderr) …
enum MkErrorE MkDbgDump_RT(MK_RT mkrt, MK_OBJN const obj, MK_STRN const message, MK_STRN const callfunc)
debug: Dump a instance to stderr with LNG and MQ internal data…
void MkDbgL_RT(MK_RT mkrt, MK_OBJN fmtobj, MK_STRN const message, MK_DBG const debug, MK_STRN const callfunc, MK_I32 const lvl)
debug: write a instance-marker to the MkLogFileC (default: stderr) using the fmtobj as prefix …
void MkDbgSTACK_RT(MK_RT mkrt, MK_OBJN fmtobj, MK_I32 const skip, MK_I32 const num, MK_STRN const callfunc)
debug: write the stack-trace to MkLogFileC (default: stderr) …
void MkDbgO_RT(MK_RT mkrt, MK_OBJN const obj, MK_STRN const callfunc)
debug: write the object-details to MkLogFileC (default: stderr) …
void MkDbgV_RT(MK_RT mkrt, MK_OBJN fmtobj, MK_STRN const callfunc, FILE *FH, MK_FST const printfmt,...)
write a printf style debug-message to FH using the internal format …
void MkLogHEX_RT(MK_RT mkrt, MK_OBJN fmtobj, MK_STRN const callfunc, MkBinaryR const data)
log binaray data as HEX into the MkLogFileC (default: stderr) …
void MkLogV_RT(MK_RT mkrt, MK_OBJN fmtobj, MK_STRN const callfunc, MK_DBG debug, MK_FST const printfmt,...)
write a printf style logging-message to MkLogFileC (default: stderr) using the internal format …
void MkObjectLog_RT(MK_RT mkrt, MK_OBJN const obj, MK_OBJN fmtobj, MK_DBG const debug, MK_STRN const callfunc, MK_I32 const lvl)
Log-Slot - log a summary of an object to the MkLogFileC (default: stderr) target …
void MkObjectLogType_RT(MK_RT mkrt, MK_OBJN const obj, MK_OBJN fmtobj, MK_DBG const debug, MK_STRN const callfunc, MK_I32 const lvl)
log the tyoe of the MkObjectS into the MkLogFileC (default: stderr) …
void MkObjectLogShort_RT(MK_RT mkrt, MK_OBJN const obj, MK_OBJN fmtobj, MK_DBG const debug, MK_STRN const callfunc, MK_I32 const lvl)
log the MkObjectS into the MkLogFileC (default: stderr) …
void MkLogC_RT(MK_RT mkrt, MK_OBJN fmtobj, MK_STRN const message, MK_DBG const debug, MK_STRN const callfunc)
write a logging-message to MkLogFileC (default: stderr) using the internal format …
void MkLogVL_RT(MK_RT mkrt, MK_OBJN fmtobj, MK_STRN const callfunc, MK_DBG debug, MK_FST const printfmt, va_list var_list)
write a vprintf style logging-message to MkLogFileC using the internal format …
void MkObjectLogLong_RT(MK_RT mkrt, MK_OBJN const obj, MK_OBJN fmtobj, MK_DBG const debug, MK_STRN const callfunc, MK_I32 const lvl)
log the MkObjectS verbose into the MkLogFileC (default: stderr) …
MK_STRN MkObjectToString_RT(MK_RT mkrt, MK_OBJN const inst)
String-Slot - returns the string representation of the inst …
static MK_ERR MkObjectToError_RT(MK_RT mkrt, MK_OBJ const obj)
Error-Slot - return an error-object pre initialized with obj data.
MK_ERR MkObjectErrorCatch_RT(MK_RT mkrt, MK_OBJN const obj, MK_EXP const exception, MK_STRN const callfunc)
convert a programming-language-error into an libmkkernel error …
static bool MkObjectIsNull(MK_OBJ const obj)
ckeck if the object is MK_NULL
MK_STRN MkObjectToNameOfType_RT(MK_RT mkrt, MK_OBJN const obj)
Type-Slot - returns the LibMkKernel-Type-Name of the obj as a string
MK_STRN const MkObjectToName_RT(MK_RT mkrt, MK_OBJN const obj)
Info-Slot - returns brief information about the obj as a string
#define MkObjectToString(...)
MK_STRN MkObjectToNameOfClass_RT(MK_RT mkrt, MK_OBJ const obj)
Class-Slot - returns the C-Class-Name of the obj as string
MK_NUM MkRefCidN_RT(MK_RT mkrt)
return the reference-count-recursion-level
MK_OBJ MkObjCopy_RT(MK_RT mkrt, MK_OBJ const tgtmng, MK_OBJN const srcmng)
call the copy from the object
bool MkSelfDeleteForce_RT(MK_RT mkrt, MK_OBJ obj)
force delete an instance, last step in instance-destructor
void(* MkSelfIncrF)(MK_RT mkrt, MK_PTR self, MK_PTR const env)
#define MkSelfCreate(...)
static MK_ATTR_HOT enum MkErrorE MkSelfNew_RT(MK_RT mkrt, MK_OBJ obj, MK_PTR *self_out, MK_PTR const env)
return the self pointer for a given obj …
static void MkSelfSet(MK_OBJ const obj, MK_PTR const self, MK_PTR const env)
set the MkObjectS::self value
MK_OBJ MkRefDecrWithoutSelf_RT(MK_RT mkrt, MK_OBJ const obj)
ATOMIC operation -> unlink self with reference-count.
static bool MkSelfExists(MK_OBJN obj)
Check if the MkObjectS::self exists …
static void MkRefIncr(MK_OBJ obj)
increment the reference-count
#define MkRefLOCK
unchangeable reference
static MK_I32 MkRefLock(MK_OBJ const obj)
lock the object
void MkRefDecr_RT(MK_RT mkrt, MK_OBJ obj)
decrement the reference-count
void MkSelfUnlink_RT(MK_RT mkrt, MK_OBJ obj)
Run the MkTypeS::selfUnlink slot from the instance...
MK_OBJ MkObjReset_RT(MK_RT mkrt, MK_OBJ const obj)
free the internal memory of an object and initialize the local variables to default values
MK_PTR MkSelfCreate_RT(MK_RT mkrt, MK_OBJ const obj, MK_PTR const env)
create the MkObjectS::self value
static bool MkRefIsLocked(MK_OBJ const obj)
check if object is locked
void(* MkSelfDecrF)(MK_RT mkrt, MK_PTR self, MK_PTR const env)
static MK_PTR MkSelfGet(MK_OBJ const obj)
get the MkObjectS::self value
MK_OBJ MkRefDecrWithUnlinkSelf_RT(MK_RT mkrt, MK_OBJ const obj)
ATOMIC operation -> unlink self from META und decr-ref-count in META.
bool MkSelfDelete_RT(MK_RT mkrt, MK_OBJ const obj)
delete the MkObjectS::self value
static MK_I32 MkRefGet(MK_OBJ const obj)
get the reference-count
static void MkRefIncrSelf(MK_OBJ const obj, MK_PTR const self, MK_PTR const env)
ATOMIC operation -> link self with reference-count.
MK_PTR(* MkSysCallocF)(size_t, size_t)
calloc syscall …
MkIdSE
signal type of the MkIdS data val …
void MkSysPrintStackTrace_RT(MK_RT mkrt, MK_OBJN fmtobj, MK_I32 const debug, MK_STRN const callfunc, MK_I32 const lvl, MK_I32 skip, MK_I32 const num)
backtrace syscall with libmkkernel error plugin
#define MkSysPrintStackTrace_2(fmtobj, debug)
#define MkSysStringIsLenEQUAL(_str, _other, _len)
static enum MkErrorE MkSysWaitForProcess(MK_OBJN fmtobj, MK_IDNT const id)
wait for process to finish syscall with libmkkernel error plugin
MK_STR(* MkSysStrNCpyF)(char *, const char *, size_t)
strdup strncpy …
static enum MkErrorE MkSysUSleep(MK_OBJN fmtobj, useconds_t const usec)
usleep syscall with libmkkernel error plugin
MK_STR MkSysStrNDup(MK_OBJN fmtobj, MK_STRN const str, MK_SIZE const len)
strndup syscall with libmkkernel error plugin
MK_PTR(* MkSysMallocF)(size_t)
malloc syscall …
void MkSysPrintProcessMemoryMap_RT(MK_RT mkrt, MK_OBJN fmtobj, MK_I32 const debug, MK_STRN const callfunc, MK_I32 const lvl)
write the memory-map to MkLogFileC used at MkDisasterSignal …
enum MkErrorE MkSysKill(MK_OBJN fmtobj, MK_I32 pid, MK_I32 signal)
kill syscall with libmkkernel error plugin
void MkSysPipeHandler(MkSysPipeHandlerE keepPipe)
internal support for pipe ignore
MK_PTR MkSysRealloc(MK_OBJN fmtobj, MK_PTR const buf, size_t const size)
realloc syscall with libmkkernel error plugin
enum MkErrorE MkSysGetPid(MK_OBJN fmtobj, MK_I32 *pid_out)
getpid syscall with libmkkernel error plugin
MK_PTR MkSysCalloc(MK_OBJN fmtobj, size_t const nmemb, size_t const size)
calloc syscall with libmkkernel error plugin
enum MkErrorE MkSysStrNCpy(MK_OBJN fmtobj, MK_STR const to, MK_STRN const from, MK_SIZE const len)
strncpy syscall with libmkkernel error plugin
pid_t(* MkSysForkF)(void)
fork syscall …
#define MkSysFree(pointer)
static enum MkErrorE MkSysWaitForThread(MK_OBJN fmtobj, MK_IDNT const id)
wait for thread to finish syscall with libmkkernel error plugin
MK_STRN MkSysHashSTR(MK_STRN key, MK_NUM length)
compute the HASH from a string …
static bool MkSysStringIsNotNULL(MK_STRN str)
test if string is NOT NULL or EMPTY …
#define MkSysStringSetNULL_R(_str)
MK_STR MkSysBasename_RT(MK_RT mkrt, MK_STRN const pathName, bool const includeExtension)
basename syscall with libmkkernel error plugin
void MkSysFreeP(MK_PTR data)
free syscall with libmkkernel error plugin
enum MkErrorE(* MkSysWaitF)(MK_OBJN const fmtobj, MK_IDNT const id)
wait for process to finish syscall with libmkkernel error plugin
MK_PTR MkSysMemDup(MK_OBJN fmtobj, MK_PTRN const blck, size_t const size)
memdup syscall with libmkkernel error plugin
MK_PTR MkSysReCalloc(MK_OBJN fmtobj, MK_PTR const buf, MK_NUM const oldnum, MK_NUM const addnum, size_t const size)
realloc syscall with libmkkernel error plugin
#define MkSysStringIsNULL_R(_str)
#define MkSysStringSet_R(_str, _val)
enum MkErrorE MkSysGetTimeOfDay(MK_OBJN fmtobj, struct mk_timeval *tv_out, struct mk_timezone *tz_out)
gettimeofday syscall with libmkkernel error plugin
#define MkSysStringIsEQUAL(_str, _other)
MK_PTR MkSysMalloc(MK_OBJN fmtobj, size_t const size)
malloc syscall with libmkkernel error plugin
static int MkSysExit_RT(MK_RT mkrt, int isThread, int num)
exit syscall with libmkkernel error plugin
MK_STR(* MkSysStrNDupF)(MK_STRN, size_t)
strndup syscall …
MK_STRN_A MkSysStringArrayDup(MK_OBJN fmtobj, MK_STRN_A const strA)
strdup syscall with libmkkernel error plugin
struct MkLalS MkLal
Language Abstraction Layer in duty.
#define MkSysFreeNonNull(pointer)
MK_STR MkSysPrintF_RT(MK_RT mkrt, MK_STRN const format,...)
sprintf syscall with libmkkernel error plugin
MK_STR(* MkSysStrDupF)(MK_STRN)
strdup syscall …
void(* MkSysFreeF)(MK_PTR)
free syscall …
MK_STRN MkSysGetTrace_RT(MK_RT mkrt, MK_OBJN fmtobj, MK_I32 const debug, MK_STRN const callfunc, MK_I32 const lvl, MK_I32 skip, MK_I32 const num)
same as MkSysPrintStackTrace but return a string…
static MK_STRN MkSysStringGetNoNULL(MK_STRN str)
get string "" or VALUE …
MK_PTR(* MkSysReallocF)(MK_PTR, size_t)
realloc syscall …
static MK_STRN MkSysStringGet(MK_STRN str)
get string NULL or VALUE …
MK_STR MkSysStrDup(MK_OBJN fmtobj, MK_STRN const str)
strdup syscall with libmkkernel error plugin
uintptr_t MK_IDNT
process or thread identifier …
static enum MkErrorE MkSysSleep(MK_OBJN fmtobj, MK_I32 const sec)
sleep syscall with libmkkernel error plugin
MK_STR MkSysDirname_RT(MK_RT mkrt, MK_STRN const pathName)
dirname syscall with libmkkernel error plugin
int(* MkSysExitF)(MK_RT mkrt, int isThread, int num)
static bool MkSysStringIsNULL(MK_STRN str)
test if string is NULL or EMPTY …
MK_I32 MkSysHashI32(MK_STRN key, MK_NUM length)
same as MkSysHashSTR but return MK_I32 …
@ MK_ID_THREAD
val has a thread handle
@ MK_ID_PROCESS
val has a process handle
@ MK_ID_UNUSED
empty struct
enum MkErrorE MkObjectDeleteCallbackSetup_RT(MK_RT mkrt, MK_STRN ident, MkObjectDeleteCallF fCall, MK_CBP callback, MkObjectDeleteFreeF fFree, MK_STRN filter)
Create/Delete the instance-delete-callback …
void MkObjectDeleteCallbackCleanup_RT(MK_RT mkrt, MK_STRN ident)
cleanup the DeleteCallback installed with MkObjectDeleteCallbackSetup …
void(* MkObjectDeleteFreeF)(MkObjectDeleteFreeF_ARGS)
void MkObjectDispose_RT(MK_RT mkrt, MK_OBJ obj)
Dispose-Slot - untie the connection between the Native-C-Instance and the libmkkernel-Instance.
MK_OBJ MkObjMerge_RT(MK_RT mkrt, MK_OBJ const obj)
Constructor - create a new object as a merge from an existing object
#define MkObjectDeleteCallF_ARGS
the MkObjectDeleteCallF arguments with default names
MK_OBJ MkObjCreate_RT(MK_RT mkrt, MK_TYP type, MK_PTR nat, MK_PTR lnk)
call the Constructor from the object
MK_OBJ MkObjDup2_RT(MK_RT mkrt, MK_OBJ const srcmng, MK_STRN const ident)
call the Dup2-Constructor from the object
#define MkObjectDeleteFreeF_ARGS
the MkObjectDeleteFreeF arguments with default names
void MkObjectDelete_RT(MK_RT mkrt, MK_OBJ obj)
Delete-Slot - delete an instance.
MK_OBJ MkObjDup_RT(MK_RT mkrt, MK_OBJ const srcobj)
call the Dup-Constructor from the object
enum MkErrorE(* MkObjectDeleteCallF)(MK_RT mkrt, MK_OBJN const obj, MK_STRN const typeName, MK_HDL const typeHdl, MK_HDL const objHdl, MK_CBP const __data__)
static callback to delete an obj …
static bool MkRtExtCheckO(MK_OBJN obj)
check MkRtExtS -> MkObjectS::signature …
static MK_RTEXTN MkRtExtN(MK_MNGN mng)
(const) cast a unknown-object into an MkRtExtS pointer or NULL if not possible
static bool MkRtExtCheck(MK_MNGN mng)
check MkRtExtS -> MkObjectS::signature …
static MK_RTEXT MkRtExt(MK_MNG mng)
cast a unknown-object into an MkRtExtS pointer or NULL if not possible
struct MkThreadDataS MkThreadDataS
bool MkRuntimeSysPipeHandlerUse
block SIGPIPE ignore handlern default=MK_YES, Java require this
static MK_HDL MkRuntimeHandleGet_RT(MK_RT mkrt, MK_RT const rt)
Handle-Get-Slot - returns a export-hdl to the MkRuntimeC useable for external storage
static MK_RT MkRuntimePrev(MK_RT const rt)
get previous instance from linked-list of MkRuntimeS type
static MK_RT MkRuntimeNext(MK_RT const rt)
get next instance from linked-list of MkRuntimeS type
#define MkRuntimeHandleResolve(...)
#define MkRuntimeHandleGet(...)
static MK_RT MkRuntimeGetNull(void)
Null-Slot - return a MkRuntimeC typed NULL instance …
static MK_RT MkRuntimeHandleResolve_RT(MK_RT mkrt, MK_HDL const netHdl)
Handle-Resolve-Slot - return a MkRuntimeC from netHdl or MK_NULL if invalid…
#define MkRuntimeInstances()
static MK_RT MkRuntimeInstances_RT(MK_RT mkrt)
get head-instance from linked-list of MkRuntimeS type …
#define MkRuntimeC_TT
class as MkTypeS-class-type, useable in a class-macro as: class##_TT …
static MK_RTN MkRtN(MK_MNGN mng)
(const) cast a unknown-object into an MkRuntimeS pointer or NULL if not possible
#define MkRuntimeC_X2obj(x)
static MK_RT MkRt(MK_MNG mng)
cast a unknown-object into an MkRuntimeS pointer or NULL if not possible
static bool MkRtCheckO(MK_OBJN obj)
check MkRuntimeS -> MkObjectS::signature …
static bool MkRtCheck(MK_MNGN mng)
check MkRuntimeS -> MkObjectS::signature …
void MkRuntimeLogTargetPop_RT(MK_RT mkrt, MkLogDataS logOld)
static void MkRuntimeDebugSet(MK_I32 dbg)
set the MkRuntimeS::debug value …
enum MkErrorE MkRuntimeLogTargetSet_RT(MK_RT mkrt, MK_STRN logTgt)
set the MkRuntimeS::log value and cleanup old value …
static enum MkErrorE MkRuntimeErrorGetCode_RT(MK_RT mkrt)
return MkErrorS::code from a given MkRuntimeC …
static bool MkRuntimeIsSilentGet(void)
get the MkRuntimeS::isSilent value …
static void MkRuntimeIsSilentSet_RT(MK_RT mkrt, bool silent)
set the MkRuntimeS::isSilent value …
void MkRuntimeSetCID(MK_OBJ const cid)
CID == context-in-duty.
static MK_I32 MkRuntimeDebugGet(void)
get the MkRuntimeS::debug value …
MkLogDataS MkRuntimeLogTargetPush_RT(MK_RT mkrt, MK_STRN logTgt)
#define MkRuntimeLogBufferPush()
static void MkRuntimeNoDecoSet_RT(MK_RT mkrt, bool noDeco)
set the MkRuntimeS::noDeco value …
static MK_STRN MkRuntimeLogTargetGet(void)
get the MkLogDataS::logNAME value …
enum MkErrorE MkRuntimeLogTargetReset_RT(MK_RT mkrt)
set the MkRuntimeS::log value to the DEFAULT value …
#define MkRuntimeLogBufferPop()
void MkRuntimeLog0_RT(MK_RT mkrt, MK_OBJN fmtobj, MK_DBG const debug, MK_STRN const callfunc, MK_I32 const lvl)
log the MkRuntimeC …
void MkRuntimeCleanup(MK_RT mkrt)
cleanup MkRuntimeRLS …
#define MkRtSetup_ON_RT(o)
size_t MkRuntimeCallbackAdd(MK_RT mkrt, MkRuntimeCallbackS *cbdata, MkRuntimeInitF rt_callback, MK_STRN ident)
add a callback to the runtime …
static MK_RT MkRuntimeGetFromObj(MK_OBJ obj)
return the initialized MkRuntimeRLS from an obj …
#define MK_ATTR_RT_INSTANCE
struct MkRuntimeCallbackS MkRuntimeCallbackS
keep callback related data …
__thread struct MkRuntimeS MkRuntimeRLS
RLS …
#define MK_RT_ATTR_FORMAT_4
MK_RT MkRuntimeSetup(MK_RT const mkrt)
initialize MkRuntimeRLS …
#define MK_INSTANCE_RT_O(o)
void MkRuntimeCallbackDel(MK_RT mkrt, MkRuntimeCallbackS *cbdata)
delete a callback from the runtime …
#define MK_RT_ATTR_FORMAT_1
#define MK_RT_ATTR_FORMAT_2
#define MK_PARSER_RT_ONLY
#define MK_ATTR_RT_STATIC
void(* MkRuntimeInitF)(MK_RT mkrt)
additional runtime initialization function …
static MK_RT MkRuntimeGet(void)
return a initialized MkRuntimeRLS …
#define MK_INSTANCE_HDL(x)
MK_PTR MkTypeSlotResolveP(MK_RT mkrt, MK_TYPN const type, size_t const offset, bool const force)
hidden function for MkTypeSlotResolve
static MK_TYP MkTyp(const MK_MNG mng)
type-check and cast a unknown-managed-object into an MkTypeS pointer or MK_NULL if not possible
static MK_TYPN MkTypN(const MK_MNGN mng)
type-check and cast a unknown-managed-object into an MkTypeS pointer or MK_NULL if not possible
static bool MkTypCheckO(MK_OBJN obj)
check MkTypeS -> MkObjectS::signature …
static bool MkTypCheck(MK_MNGN mng)
check MkTypeS -> MkObjectS::signature …
#define MkTypeLoop(_cls, _var)
void MkTypeLog_RT(MK_RT mkrt, MK_TYPN const typ, MK_OBJN fmtobj, MK_DBG const debug, MK_STRN const callfunc, MK_I32 const lvl)
log the MkTypeS …
void MkTypeDelete_RT(MK_RT mkrt, MK_TYP const typ)
delete a type object
static MK_OBJ MkTypeInstances(MK_TYP const typ)
access the instance attribute of the type…
MK_TYP MkTypeDup2_RT(MK_RT mkrt, MK_TYPN const typ, MK_STRN const ident)
duplicate typ to create a lightweight-type …
MK_TYP MkTypeResolve_RT(MK_RT mkrt, MK_TYPN const typ)
resolve a new type
static MK_TYPN MkTypeNextN(MK_TYPN const typ)
get next instance from linked-list of MkObjectS type
MK_OBJ MkTypeAlloc_RT(MK_RT mkrt, MK_TYPN const typ)
alloc instance-memory for MkTypeS …
#define MkTypeCreate(clsV, basicV, identV)
array of MK_STRN values …
define the storage-allocator function
MkAllocDeleteF alloc_deleteF
"free" the memory of the object
MkAllocCreateFLT alloc_createF
"calloc" the memory of the object
MK_PTR alloc_data
data use for alloc_createF and alloc_deleteF
binary data default format …
MK_SIZE size
size of the data pointer
MK_BINN data
pointer to the binary data
the final class of MkBufferS with 1024 byte ILS-Size …
the final class of MkBufferS with 256 byte ILS-Size …
the final class of MkBufferS with 64 byte ILS-Size …
The CLASS used to store a list of MkBufferS items into a flat array…
instance storage predefined
MK_NUM offset
offset from start of MkBufferS to the start of MkBufferS::ils_data
MK_NUM size
size of the MkBufferS::ils_data
The ABSTRACT-CLASS used to store a native-type-data-item defined by PRIMITIVE TYPE …
union MkBufferU first
POINTER to native data representation (ILS or malloc)
struct MkBufferS::ilsS ils
ILS = predefined storage used for MkBufferS::storage->first.
MK_BINB ils_data[MkBufferS_ils_size]
ILS storage
struct MkBufferS::@5 storage
MK_NUM size
the size of the data-segment
bool doBufferFree
should the data be freed? -> example: pBufferRefInit
struct MkBufferS::@4 var
variable part of the instance-data
union MkBufferS::@3 super
MK_NUM cursize
currently used size (always: cursize < size)
enum MkTypeE type
type of the item stored into the data-segment
the final class of MkBufferStreamS with 1024 byte ILS-Size …
struct MkBufferStreamS bus
the final class of MkBufferStreamS with 16384 byte ILS-Size …
struct MkBufferStreamS bus
the final class of MkBufferStreamS with 256 byte ILS-Size …
struct MkBufferStreamS bus
the final class of MkBufferStreamS with 64 byte ILS-Size …
struct MkBufferStreamS bus
The ABSTRACT-CLASS MkBufferStreamS is used for package-based serialized IO …
struct MkBuffer64S busRef
union MkBufferU cur
point to current position in the package, used for write-to or read-from .
struct MkBufferStreamS::@11 storage
struct MkBufferStreamSaveS * busReadSave
MK_BINB ils_data[MkBufferStreamS_ils_size]
struct MkBufferStreamSaveS * busWriteSave
struct MkCacheS saveCache
union MkBufferStreamS::@9 super
struct MkBufferStreamS::@10 var
a linked-list to opearate a storage of data items
MK_SIG signature
check if item is valid or not
bool doFree
should the item be freed?
struct MkCacheItemS * prev
link to the prev item
struct MkCacheItemS * next
link to the next item
This is an circel storage of a linked-list connected with a "lock" at MkCacheS …
MK_NUM num
MIN num items in cache.
MkCacheCF createF
function to create 'data'
struct MkCacheItemS * free_first
free first cache item
MK_PTR createD
additional create data item
MkCacheDF deleteF
function to delete 'data'
struct MkCacheItemS * used
used cache items
struct MkCacheItemS * free_last
free last cache item
MK_RT runtime
link to the runtime
extension-slot for MkErrorS …
MkErrorFormatOfF fErrorFormatOf
plugin for sErr2Fmt …
MkErrorSetRF fErrorSetR
plugin for MkErrorSetR …
MkErrorResetF fErrorReset
plugin for MkErrorReset …
MkErrorPanikF fErrorPanik
plugin for MkPanicVL …
MkErrorSetEF fErrorSetE
plugin for MkErrorSetE …
MkErrorLogF fErrorLog
plugin for MkErrorLog …
MkErrorResetOnExitF fErrorResetOnExit
plugin for MkErrorReset …
MkErrorAppendFLT fErrorAppend
plugin for MkErrorAppendVL …
MkErrorSetVLF fErrorSetVL
plugin for MkErrorSetVL …
MkErrorInit fErrorInit
plugin for MkErrorSetVL …
signal-slot for raise an error …
signal-slot for panic on error …
signal-slot for ignore on error …
signal-slot for panic on error …
signal-slot for print on error …
The data-type to store and handle the error-condition …
MK_OBJN format_of_error
used to format the error-message and as input for source_of_error
bool noRaise
do not return MK_ERROR and do not raise an target-language-exception
MK_ERREXT mkErrExt
package specific error extension goes into this double linked list
MK_I32 num
the error number also used as exit code
enum MkErrorE code
the error code
bool append
allow to append? -> true or false
struct MkBuffer1024S text
the error message
union MkErrorS::@18 super
MK_MNGN source_of_error
source of the error, NULL = current context
Base class for the extension technologie …
union MkExtensionS::@17 super
struct MkExtensionS * next
struct MkExtensionS * prev
the double-linked-list (utlist_mk.h) needs this
data type for process/thread identification …
bool setByExtern
vales of val was set by extern source
MK_IDNT val
process or thread handle
bool ioIsPipe
startet in PIPE mode: client @ server @ ... and NOT in server --thread|spawn|fork
enum MkIdSE type
signal type of val data
Interface between libmkkernel and the Operating-System …
MkSysStrDupF SysStrDup
strdup syscall …
MkSysStrNCpyF SysStrNCpy
strdup strncpy …
MkSysWaitF MkSysWaitForProcessCB
wait for process to finish syscall with libmkkernel error plugin
MkSysWaitF MkSysWaitForThreadCB
wait for process to finish syscall with libmkkernel error plugin
MkSysCallocF SysCalloc
calloc syscall …
enum MkErrorE(* SysUSleep)(MK_OBJN const obj, unsigned int const usec)
usleep syscall with libmkkernel error plugin
MkSysReallocF SysRealloc
realloc syscall …
MkSysMallocF SysMalloc
malloc syscall …
MkSysFreeF SysFree
free syscall …
MkSysStrNDupF SysStrNDup
strndup syscall …
MkSysForkF SysFork
fork syscall …
enum MkErrorE(* SysSleep)(MK_OBJN const obj, unsigned int const sec)
sleep syscall with libmkkernel error plugin
struct to hold the mkrt-logging-data …
char logNAME[MkLogDataS_LogNAME_size]
FILE * logFILE
logging target… open MkLogDataS::logFILE (default: stderr)
bool logLOCK
indicate if log was set (true) or has the default (false)
int logREF
protect "BUFFER" against recursion
size_t logSIZE
size of logBUF
define a MkLogFileC object …
union MkLogFileS::@16 super
the protect is used to "protect" data set by pAllocCreate if the new object is later initialized with...
bool isLocal
has the object a local reference? - has been created by TLS or MkBufferCreateREF ?...
bool selfCreated
if the self was created by selfCreate than it is an INTERNAL object …
struct MkObjectProtectS obj_protect
the protect is used to "protect" data set by pAllocCreate if the new object is later initialized with...
MK_SIG signature
should be the SIGNATURE
MK_RT objRt
link to the kernel-runtime the instance was created in …
MK_PTR env
link to the object "runtime", set by selfCreate …
MK_I32 selfRefCount
Delete the MkObjectS::self at the same MkObjectS::refCount as was created …
MK_RTEXT objRtExt
link to the kernel-runtime-extension the instance was created in …
MK_TYP type
link to the object type
bool deleteCallbackCalled
Activate if object is on delete.
MK_HDL netHdl
if not-null the object was exported with MkObjectHandleGet
MK_PTR self
link between the managed object and the object in the target-programming-language
MK_I32 refCount
is THIS object in use?
MkRtExtS - extend the MkRuntimeC with a library specific feature …
keep callback related data …
struct MkRuntimeCallbackS * next
MkRuntimeInitF cb
required data
MK_STRB ident[MkRuntimeCallbackS_ident_size+1]
required data
struct MkRuntimeCallbackS * prev
The MkRuntimeS provide a per-thread environment for libmkkernel …
struct MkTypeDefS _MkErrorIgnoreC_T
struct MkTypeDefS _MkRtExtC_T
struct MkTypeDefS _MkErrorDefaultC_T
struct MkTypeDefS _MkBufferStreamC_T
struct MkTypeDefS _MkExtensionC_T
struct MkTypeDefS _MkBuffer256C_T
struct MkTypeDefS _MkErrorPanicC_T
MkThreadDataS mkThreadData
application specific thread data …
struct MkTypeDefS _MkErrExtC_T
bool MkSelfIncrOnCacheB
incr refCount on self at MkSelfNew …
MkLogDataS log
struct to hold the mkrt-logging-data …
struct MkTypeDefS _MkLogFileC_T
struct MkTypeDefS _MkRuntimeC_T
struct MkTypeS _MkTypeC_TT
struct MkTypeDefS _MkErrorC_T
struct MkErrorPanicS error_panic
panic-system-error - panic on next error …
MkSelfDecrF fSelfDecr
"decr" Self pointer if pointer stored INTERNAL (MkObjectHandleDelete)
bool isSilent
write (MK_NO) or don't write (MK_YES) any message to MkLogFileC (default: stderr) (default: MK_NO) …
MK_I32 debug
set the debug-level of the context … Valid values are 0 <= debug-level <= 9 using 0 for no-debug and ...
struct MkErrorIgnoreS error_ignore
ignore-system-error - ignore the next error …
struct MkTypeDefS _MkBufferC_T
struct MkTypeDefS _MkErrorExitC_T
struct MkTypeDefS _MkBuffer1024C_T
struct MkTypeDefS _MkBufferStream64C_T
MK_RTEXT mkRtExt
package specific runtime extension …
struct MkBuffer64S tbuf
runtime local buffer (RLS) for misc tasks …
bool noDeco
do not use decoration to generate log messages (default: use decoration) …
struct MkTypeDefS _MkBufferListC_T
struct MkTypeDefS _MkBuffer64C_T
MkSelfIncrF fSelfIncr
"incr" Self pointer if pointer stored INTERNAL (MkObjectHandleGet)
struct MkTypeDefS _MkBufferStream1024C_T
struct MkErrorS error_mk
default-system-error - default-error …
struct MkErrorPrintS error_print
ignore-system-error - print the next error into MkLogFileC …
struct MkTypeDefS _MkErrorPrintC_T
struct MkTypeDefS _MkBufferStream16384C_T
struct MkTypeS _MkTypeDefC_TT
MK_BINB private_variables[12986]
struct MkTypeDefS _MkObjectC_T
struct MkErrorPanicS error_exit
panic-system-error - panic on next error …
struct MkTypeDefS _MkBufferStream256C_T
union MkRuntimeS::@26 super
is the MkRuntimeS initialized? …
MK_RTEXT mkRtExtAry[MkExtension_size]
package specific runtime extension - fast access by …
string data default format …
MK_STRN ptr
pointer to the string data
MK_NUM len
len of the string data
super-class-base, the MkTypeS using the super-macro-syntax for all non specific types …
MkTypeS - class known as typ or type is used as class-base for a Managed-Object-Technology (MOT) type...
MkSelfUnlinkF selfUnlink
"unlink" the "self" pointer from META-Kernel
MkSelfDeleteF selfDelete
"delete" the "self" pointer
bool noSelf
do NOT use the self feature -> used by MqFactoryS
MkLogF log
"log" object data to MkLogFileC (default: stderr)
MkLogFormatF fLogFormat
format the log message of an object, used in "sLogVL_O"
MkToStringF toString
get the string representation
MkSelfCreateF selfCreate
"create" the "self" pointer
size_t typsize
the size of the this type self, used in MkTypeDup2
MK_TYP type_class
point to the instancesR linked list of the class-type
MkConstructorF constructor
create an object
MkTypeInitF type_init
initializer for new type
MkDup2F dup2
"dup" constructor with "ident" initialisation
size_t objsize
the size of the new object created with this type, used in malloc
MkResetF reset
"reset" the object to the "initial" state
MkDupF dup
"dup" constructor
MkDestructorF destructor
delete an object
MK_I32 delCbCnt
number of callback registered for this type
MK_SIG objsig
type-instance: signature as unsinged integer (32bit)
MK_SIG objmask
type-instance: mask to filter out the valid part of the signatur
MkMergeF merge
"merge" constructor
MK_TYP type_base
base type
MK_I32 type_id
default "0" but "MkFactoryTypeAdd" need more
union used to set or modify native data from an MkBufferS object …
MK_BOL BOL
1 byte boolean data
MK_I64 I64
8 byte integer data
MK_DBL DBL
8 byte double data
MK_I16 I16
2 byte short data
MK_FLT FLT
4 byte float data
MK_I32 I32
4 byte integer data
a union for all data items supported by MkBufferS …
MK_STRN C
const C string like data (e.g. with a \0 at the end)
MK_ATO * A
atom for native data-types
MK_LST L
list object type data
MK_STR S
C string like data (e.g. with a \0 at the end)
MK_BIN B
arbitrary byte-array data