MkObjectC - L)anguage A)bstraction L)ayer definition … More...
Data Structures | |
struct | MkIdS |
data type for process/thread identification … More... | |
struct | MkLalS |
Interface between libmkkernel and the Operating-System … More... | |
Macros | |
#define | MkSysFree(pointer) |
#define | MkSysFreeNonNull(pointer) |
#define | MkSysStringIsEQUAL(str, other) |
#define | MkSysStringIsLenEQUAL(str, other, len) |
Typedefs | |
typedef uintptr_t | MK_IDNT |
process or thread identifier … | |
typedef MK_PTR(* | MkSysCallocF) (size_t, size_t) |
calloc syscall … | |
typedef MK_PTR(* | MkSysMallocF) (size_t) |
malloc syscall … | |
typedef MK_STR(* | MkSysStrDupF) (MK_STRN) |
strdup syscall … | |
typedef MK_STR(* | MkSysStrNCpyF) (char *, const char *, size_t) |
strdup strncpy … | |
typedef MK_STR(* | MkSysStrNDupF) (MK_STRN, size_t) |
strndup syscall … | |
typedef MK_PTR(* | MkSysReallocF) (MK_PTR, size_t) |
realloc syscall … | |
typedef void(* | MkSysFreeF) (MK_PTR) |
free syscall … | |
typedef pid_t(* | MkSysForkF) (void) |
fork syscall … | |
typedef enum MkSysPipeHandlerE | MkSysPipeHandlerE |
Enumerations | |
enum | MkIdSE { MK_ID_UNUSED = 0 , MK_ID_PROCESS = 1 , MK_ID_THREAD = 2 } |
signal type of the MkIdS data val … More... | |
enum | MkSysPipeHandlerE { MK_PIPE_KEEP = 0 , MK_PIPE_IGNORE = 1 } |
Functions | |
MK_EXTERN MK_PTR | MkSysCalloc (MK_OBJN fmtobj, size_t const nmemb, size_t const size) |
calloc syscall with libmkkernel error plugin | |
MK_EXTERN MK_PTR | MkSysMalloc (MK_OBJN fmtobj, size_t const size) |
malloc syscall with libmkkernel error plugin | |
MK_EXTERN MK_STR | MkSysStrDup (MK_OBJN fmtobj, MK_STRN const str) |
strdup syscall with libmkkernel error plugin | |
MK_EXTERN MK_STR | MkSysStrNDup (MK_OBJN fmtobj, MK_STRN const str, MK_SIZE const len) |
strndup syscall with libmkkernel error plugin | |
MK_EXTERN enum MkErrorE | MkSysStrNCpy (MK_OBJN fmtobj, MK_STR const to, MK_STRN const from, MK_SIZE const len) |
strncpy syscall with libmkkernel error plugin | |
MK_EXTERN MK_PTR | MkSysRealloc (MK_OBJN fmtobj, MK_PTR const buf, size_t const size) |
realloc syscall with libmkkernel error plugin | |
MK_EXTERN 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 | |
MK_EXTERN MK_PTR | MkSysMemDup (MK_OBJN fmtobj, MK_PTRN const blck, size_t const size) |
memdup syscall with libmkkernel error plugin | |
MK_EXTERN MK_STRN_A | MkSysStringArrayDup (MK_OBJN fmtobj, MK_STRN_A const strA) |
strdup syscall with libmkkernel error plugin | |
void | MkSysFree (MK_PTR pointer) |
free syscall … | |
void | MkSysFreeNonNull (MK_PTR pointer) |
MK_EXTERN void | MkSysFreeP (MK_PTR data) |
free syscall with libmkkernel error plugin | |
MK_EXTERN void | MkSysPrintTrace_RT (MK_RT mkrt, MK_OBJN fmtobj, MK_I32 skip, MK_I32 const num, MK_I32 const debug, MK_STRN const callfunc, MK_I32 const lvl) |
backtrace syscall with libmkkernel error plugin | |
MK_EXTERN void | MkSysPrintProcessMemoryMap_RT (MK_RT mkrt, MK_OBJN fmtobj, MK_I32 const debug, MK_STRN const callfunc, MK_I32 const lvl) |
print memory map on DUMP | |
MK_EXTERN MK_STRN | MkSysGetTrace_RT (MK_RT mkrt, MK_OBJN fmtobj, MK_I32 skip, MK_I32 const num, MK_I32 const debug, MK_STRN const callfunc, MK_I32 const lvl) |
same as MkSysPrintTrace but return an string… | |
enum MkErrorE | MkSysWait (MK_OBJN fmtobj, const struct MkIdS *idP_out) |
wait for process or thread syscall with libmkkernel error plugin | |
enum MkErrorE | MkSysUSleep (MK_OBJN fmtobj, useconds_t const usec) |
usleep syscall with libmkkernel error plugin | |
enum MkErrorE | MkSysSleep (MK_OBJN fmtobj, MK_I32 const sec) |
sleep syscall with libmkkernel error plugin | |
MK_NO_RETURN void | MkSysExit (int isThread, int num) |
exit syscall with libmkkernel error plugin | |
MK_EXTERN MK_STR | MkSysBasename_RT (MK_RT mkrt, MK_STRN const pathName, bool const includeExtension) |
basename syscall with libmkkernel error plugin | |
MK_EXTERN MK_STR | MkSysDirname_RT (MK_RT mkrt, MK_STRN const pathName) |
dirname syscall with libmkkernel error plugin | |
MK_EXTERN MK_STR | MkSysPrintF_RT (MK_RT mkrt, MK_STRN const format,...) |
sprintf syscall with libmkkernel error plugin | |
MK_EXTERN enum MkErrorE | MkSysGetTimeOfDay (MK_OBJN fmtobj, struct mk_timeval *tv_out, struct mk_timezone *tz_out) |
gettimeofday syscall with libmkkernel error plugin | |
bool | MkSysStringIsNULL (MK_STRN str) |
test if string is NULL or EMPTY … | |
bool | MkSysStringIsNotNULL (MK_STRN str) |
test if string is NOT NULL or EMPTY … | |
bool | MkSysStringIsEQUAL (MK_STRN const str, MK_STRN const other) |
test if string(s) are equal … | |
bool | MkSysStringIsLenEQUAL (MK_STRN const str, MK_STRN const other, MK_SIZE const len) |
test if string(s) are equal … | |
MK_STRN | MkSysStringGet (MK_STRN str) |
get string NULL or VALUE … | |
MK_STRN | MkSysStringGetNoNULL (MK_STRN str) |
get string "" or VALUE … | |
MK_EXTERN MK_STRN | MkSysHashSTR (MK_STRN key, MK_NUM length) |
compute the HASH from a string … | |
MK_EXTERN MK_I32 | MkSysHashI32 (MK_STRN key, MK_NUM length) |
same as MkSysHashSTR but return MK_I32 … | |
MK_EXTERN enum MkErrorE | MkSysKill (MK_OBJN fmtobj, MK_I32 pid, MK_I32 signal) |
kill syscall with libmkkernel error plugin | |
MK_EXTERN enum MkErrorE | MkSysGetPid (MK_OBJN fmtobj, MK_I32 *pid_out) |
getpid syscall with libmkkernel error plugin | |
MK_EXTERN void | MkSysPipeHandler (MkSysPipeHandlerE keepPipe) |
internal support for pipe ignore | |
Variables | |
MK_EXTERN_DATA struct MkLalS | MkLal |
Language Abstraction Layer in duty. | |
MkObjectC - MkObjectC_Sys_C_API - overload | |
#define | MkSysCalloc_2(nmemb, size) |
#define | MkSysGetTrace_NULL(...) |
#define | MkSysGetTrace(...) |
#define | MkSysGetTrace_5(fmtobj, skip, num, debug, callfunc) |
#define | MkSysGetTrace_4(fmtobj, skip, num, debug) |
#define | MkSysGetTrace_3(fmtobj, skip, num) |
#define | MkSysGetTrace_2(fmtobj, skip) |
#define | MkSysGetTrace_1(fmtobj) |
#define | MkSysGetTrace_0() |
#define | MkSysKill_2(pid, signal) |
#define | MkSysKill_E(...) |
#define | MkSysKill_C(...) |
#define | MkSysMalloc_1(size) |
#define | MkSysMemDup_2(blck, size) |
#define | MkSysPrintProcessMemoryMap_NULL(...) |
#define | MkSysPrintProcessMemoryMap(...) |
#define | MkSysPrintProcessMemoryMap_3(fmtobj, debug, callfunc) |
#define | MkSysPrintProcessMemoryMap_2(fmtobj, debug) |
#define | MkSysPrintProcessMemoryMap_1(fmtobj) |
#define | MkSysPrintProcessMemoryMap_0() |
#define | MkSysPrintTrace_NULL(...) |
#define | MkSysPrintTrace(...) |
#define | MkSysPrintTrace_5(fmtobj, skip, num, debug, callfunc) |
#define | MkSysPrintTrace_4(fmtobj, skip, num, debug) |
#define | MkSysPrintTrace_3(fmtobj, skip, num) |
#define | MkSysPrintTrace_2(fmtobj, skip) |
#define | MkSysPrintTrace_1(fmtobj) |
#define | MkSysPrintTrace_0() |
#define | MkSysReCalloc_4(buf, oldnum, addnum, size) |
#define | MkSysRealloc_2(buf, size) |
#define | MkSysSleep_1(sec) |
#define | MkSysSleep_E(...) |
#define | MkSysSleep_C(...) |
#define | MkSysStrDup_1(str) |
#define | MkSysStrNCpy_3(to, from, len) |
#define | MkSysStrNCpy_E(...) |
#define | MkSysStrNCpy_C(...) |
#define | MkSysStrNDup_2(str, len) |
#define | MkSysStringArrayDup_1(strA) |
#define | MkSysUSleep_1(usec) |
#define | MkSysUSleep_E(...) |
#define | MkSysUSleep_C(...) |
#define | MkSysGetPid_1(pid_out) |
#define | MkSysGetPid_E(...) |
#define | MkSysGetPid_C(...) |
#define | MkSysGetPid_e(...) |
#define | MkSysGetTimeOfDay_2(tv_out, tz_out) |
#define | MkSysGetTimeOfDay_E(...) |
#define | MkSysGetTimeOfDay_C(...) |
#define | MkSysWait_1(idP_out) |
#define | MkSysWait_E(...) |
#define | MkSysWait_C(...) |
#define | MkSysWait_e(...) |
#define | MkSysBasename_NULL(...) |
#define | MkSysBasename(...) |
#define | MkSysDirname_NULL(...) |
#define | MkSysDirname(...) |
#define | MkSysHashI32_1(key) |
#define | MkSysHashSTR_1(key) |
#define | MkSysPrintF_NULL(...) |
#define | MkSysPrintF(...) |
MkObjectC - L)anguage A)bstraction L)ayer definition …
The LAL is required to give the target of embedding a change to modify the access to system functions. RUBY for example has it's own Thread-Creation function.
All wrappers to access the underlying OS,Languages and system functions are located in this section. Every external Function has additional code to map the OS/System specific error codes/messages into a libmkkernel specific error codes/messages
#define MkSysBasename | ( | ... | ) |
Definition at line 1704 of file kernel_overload_mk.h.
#define MkSysBasename_NULL | ( | ... | ) |
Definition at line 1703 of file kernel_overload_mk.h.
#define MkSysCalloc_2 | ( | nmemb, | |
size ) |
Definition at line 1646 of file kernel_overload_mk.h.
#define MkSysDirname | ( | ... | ) |
Definition at line 1706 of file kernel_overload_mk.h.
#define MkSysDirname_NULL | ( | ... | ) |
Definition at line 1705 of file kernel_overload_mk.h.
#define MkSysFree | ( | pointer | ) |
Definition at line 2613 of file LibMkKernel_mk.h.
#define MkSysFreeNonNull | ( | pointer | ) |
Definition at line 2622 of file LibMkKernel_mk.h.
#define MkSysGetPid_1 | ( | pid_out | ) |
Definition at line 1690 of file kernel_overload_mk.h.
#define MkSysGetPid_C | ( | ... | ) |
Definition at line 1692 of file kernel_overload_mk.h.
#define MkSysGetPid_E | ( | ... | ) |
Definition at line 1691 of file kernel_overload_mk.h.
#define MkSysGetPid_e | ( | ... | ) |
Definition at line 1693 of file kernel_overload_mk.h.
#define MkSysGetTimeOfDay_2 | ( | tv_out, | |
tz_out ) |
Definition at line 1694 of file kernel_overload_mk.h.
#define MkSysGetTimeOfDay_C | ( | ... | ) |
Definition at line 1696 of file kernel_overload_mk.h.
#define MkSysGetTimeOfDay_E | ( | ... | ) |
Definition at line 1695 of file kernel_overload_mk.h.
#define MkSysGetTrace | ( | ... | ) |
Definition at line 1648 of file kernel_overload_mk.h.
#define MkSysGetTrace_0 | ( | ) |
Definition at line 1654 of file kernel_overload_mk.h.
#define MkSysGetTrace_1 | ( | fmtobj | ) |
Definition at line 1653 of file kernel_overload_mk.h.
#define MkSysGetTrace_2 | ( | fmtobj, | |
skip ) |
Definition at line 1652 of file kernel_overload_mk.h.
#define MkSysGetTrace_3 | ( | fmtobj, | |
skip, | |||
num ) |
Definition at line 1651 of file kernel_overload_mk.h.
#define MkSysGetTrace_4 | ( | fmtobj, | |
skip, | |||
num, | |||
debug ) |
Definition at line 1650 of file kernel_overload_mk.h.
#define MkSysGetTrace_5 | ( | fmtobj, | |
skip, | |||
num, | |||
debug, | |||
callfunc ) |
Definition at line 1649 of file kernel_overload_mk.h.
#define MkSysGetTrace_NULL | ( | ... | ) |
Definition at line 1647 of file kernel_overload_mk.h.
#define MkSysHashI32_1 | ( | key | ) |
Definition at line 1707 of file kernel_overload_mk.h.
#define MkSysHashSTR_1 | ( | key | ) |
Definition at line 1708 of file kernel_overload_mk.h.
#define MkSysKill_2 | ( | pid, | |
signal ) |
Definition at line 1655 of file kernel_overload_mk.h.
#define MkSysKill_C | ( | ... | ) |
Definition at line 1657 of file kernel_overload_mk.h.
#define MkSysKill_E | ( | ... | ) |
Definition at line 1656 of file kernel_overload_mk.h.
#define MkSysMalloc_1 | ( | size | ) |
Definition at line 1658 of file kernel_overload_mk.h.
#define MkSysMemDup_2 | ( | blck, | |
size ) |
Definition at line 1659 of file kernel_overload_mk.h.
#define MkSysPrintF | ( | ... | ) |
Definition at line 1710 of file kernel_overload_mk.h.
#define MkSysPrintF_NULL | ( | ... | ) |
Definition at line 1709 of file kernel_overload_mk.h.
#define MkSysPrintProcessMemoryMap | ( | ... | ) |
Definition at line 1661 of file kernel_overload_mk.h.
#define MkSysPrintProcessMemoryMap_0 | ( | ) |
Definition at line 1665 of file kernel_overload_mk.h.
#define MkSysPrintProcessMemoryMap_1 | ( | fmtobj | ) |
Definition at line 1664 of file kernel_overload_mk.h.
#define MkSysPrintProcessMemoryMap_2 | ( | fmtobj, | |
debug ) |
Definition at line 1663 of file kernel_overload_mk.h.
#define MkSysPrintProcessMemoryMap_3 | ( | fmtobj, | |
debug, | |||
callfunc ) |
Definition at line 1662 of file kernel_overload_mk.h.
#define MkSysPrintProcessMemoryMap_NULL | ( | ... | ) |
Definition at line 1660 of file kernel_overload_mk.h.
#define MkSysPrintTrace | ( | ... | ) |
Definition at line 1667 of file kernel_overload_mk.h.
#define MkSysPrintTrace_0 | ( | ) |
Definition at line 1673 of file kernel_overload_mk.h.
#define MkSysPrintTrace_1 | ( | fmtobj | ) |
Definition at line 1672 of file kernel_overload_mk.h.
#define MkSysPrintTrace_2 | ( | fmtobj, | |
skip ) |
Definition at line 1671 of file kernel_overload_mk.h.
#define MkSysPrintTrace_3 | ( | fmtobj, | |
skip, | |||
num ) |
Definition at line 1670 of file kernel_overload_mk.h.
#define MkSysPrintTrace_4 | ( | fmtobj, | |
skip, | |||
num, | |||
debug ) |
Definition at line 1669 of file kernel_overload_mk.h.
#define MkSysPrintTrace_5 | ( | fmtobj, | |
skip, | |||
num, | |||
debug, | |||
callfunc ) |
Definition at line 1668 of file kernel_overload_mk.h.
#define MkSysPrintTrace_NULL | ( | ... | ) |
Definition at line 1666 of file kernel_overload_mk.h.
#define MkSysRealloc_2 | ( | buf, | |
size ) |
Definition at line 1675 of file kernel_overload_mk.h.
#define MkSysReCalloc_4 | ( | buf, | |
oldnum, | |||
addnum, | |||
size ) |
Definition at line 1674 of file kernel_overload_mk.h.
#define MkSysSleep_1 | ( | sec | ) |
Definition at line 1676 of file kernel_overload_mk.h.
#define MkSysSleep_C | ( | ... | ) |
Definition at line 1678 of file kernel_overload_mk.h.
#define MkSysSleep_E | ( | ... | ) |
Definition at line 1677 of file kernel_overload_mk.h.
#define MkSysStrDup_1 | ( | str | ) |
Definition at line 1679 of file kernel_overload_mk.h.
#define MkSysStringArrayDup_1 | ( | strA | ) |
Definition at line 1684 of file kernel_overload_mk.h.
#define MkSysStringIsEQUAL | ( | str, | |
other ) |
Definition at line 2814 of file LibMkKernel_mk.h.
#define MkSysStringIsLenEQUAL | ( | str, | |
other, | |||
len ) |
Definition at line 2818 of file LibMkKernel_mk.h.
#define MkSysStrNCpy_3 | ( | to, | |
from, | |||
len ) |
Definition at line 1680 of file kernel_overload_mk.h.
#define MkSysStrNCpy_C | ( | ... | ) |
Definition at line 1682 of file kernel_overload_mk.h.
#define MkSysStrNCpy_E | ( | ... | ) |
Definition at line 1681 of file kernel_overload_mk.h.
#define MkSysStrNDup_2 | ( | str, | |
len ) |
Definition at line 1683 of file kernel_overload_mk.h.
#define MkSysUSleep_1 | ( | usec | ) |
Definition at line 1685 of file kernel_overload_mk.h.
#define MkSysUSleep_C | ( | ... | ) |
Definition at line 1687 of file kernel_overload_mk.h.
#define MkSysUSleep_E | ( | ... | ) |
Definition at line 1686 of file kernel_overload_mk.h.
#define MkSysWait_1 | ( | idP_out | ) |
Definition at line 1697 of file kernel_overload_mk.h.
#define MkSysWait_C | ( | ... | ) |
Definition at line 1699 of file kernel_overload_mk.h.
#define MkSysWait_E | ( | ... | ) |
Definition at line 1698 of file kernel_overload_mk.h.
#define MkSysWait_e | ( | ... | ) |
Definition at line 1700 of file kernel_overload_mk.h.
typedef uintptr_t MK_IDNT |
process or thread identifier …
Definition at line 2115 of file LibMkKernel_mk.h.
typedef MK_PTR(* MkSysCallocF) (size_t, size_t) |
typedef pid_t(* MkSysForkF) (void) |
fork syscall …
additional info: man fork
Definition at line 2372 of file LibMkKernel_mk.h.
typedef void(* MkSysFreeF) (MK_PTR) |
typedef MK_PTR(* MkSysMallocF) (size_t) |
typedef enum MkSysPipeHandlerE MkSysPipeHandlerE |
typedef MK_STR(* MkSysStrNCpyF) (char *, const char *, size_t) |
enum MkIdSE |
signal type of the MkIdS data val …
Enumerator | |
---|---|
MK_ID_UNUSED | empty struct |
MK_ID_PROCESS | val has a process handle |
MK_ID_THREAD | val has a thread handle |
Definition at line 2119 of file LibMkKernel_mk.h.
enum MkSysPipeHandlerE |
Enumerator | |
---|---|
MK_PIPE_KEEP | |
MK_PIPE_IGNORE |
Definition at line 2909 of file LibMkKernel_mk.h.
MK_EXTERN MK_STR MkSysBasename_RT | ( | MK_RT | mkrt, |
MK_STRN const | pathName, | ||
bool const | includeExtension ) |
basename syscall with libmkkernel error plugin
additional info: man basename
[in] | mkrt | the MkRuntimeS instance to work on - the runtime argument, used by MK_RT_CALL (C-only) |
[in] | pathName | The path to extract the basename from. The value of pathName will not be changed and for MK_NULL return unknown |
[in] | includeExtension | add extension like '.exe' to the filename (true or false) |
calloc syscall with libmkkernel error plugin
additional info: man calloc
[in] | fmtobj | managed object used to format the log-message (default=MK_NULL → use default-format) |
[in] | nmemb | the number of members in the memory block |
[in] | size | the size of a single memory block |
dirname syscall with libmkkernel error plugin
additional info: man dirname
[in] | mkrt | the MkRuntimeS instance to work on - the runtime argument, used by MK_RT_CALL (C-only) |
[in] | pathName | path to extract the dirname from (value of in will not be changed) |
|
inline |
exit syscall with libmkkernel error plugin
[in] | isThread | exit a thread? |
[in] | num | exit code |
Definition at line 2726 of file LibMkKernel_mk.h.
void MkSysFree | ( | MK_PTR | pointer | ) |
free syscall …
additional info: man free
[in,out] | pointer | of the memory-block to delete, the pointer will be set to MK_NULL |
void MkSysFreeNonNull | ( | MK_PTR | pointer | ) |
free syscall with libmkkernel error plugin
additional info: man free
Free memory of data if data is not MK_NULL
.
[in] | data | block to be freed |
getpid syscall with libmkkernel error plugin
additional info: man 3 getpid
[in] | fmtobj | managed object used to format the log-message (default=MK_NULL → use default-format) |
[out] | pid_out | the own pid |
MK_EXTERN enum MkErrorE MkSysGetTimeOfDay | ( | MK_OBJN | fmtobj, |
struct mk_timeval * | tv_out, | ||
struct mk_timezone * | tz_out ) |
gettimeofday syscall with libmkkernel error plugin
additional info: man gettimeofday
[in] | fmtobj | managed object used to format the log-message (default=MK_NULL → use default-format) |
[out] | tv_out | the timeval object |
[out] | tz_out | the timezone object |
MK_EXTERN MK_STRN MkSysGetTrace_RT | ( | MK_RT | mkrt, |
MK_OBJN | fmtobj, | ||
MK_I32 | skip, | ||
MK_I32 const | num, | ||
MK_I32 const | debug, | ||
MK_STRN const | callfunc, | ||
MK_I32 const | lvl ) |
same as MkSysPrintTrace but return an string…
same as MkSysHashSTR but return MK_I32 …
key | key from which to compute hash value. |
length | length from key, if "<0" the size will be computed |
compute the HASH from a string …
The hash-value is computed with the fast TCL hash-function
I tried a zillion different hash functions and asked many other people for advice. Many people had their own favorite functions, all different, but no-one had much idea why they were good ones. I chose the one below (multiply by 9 and add new character) because of the following reasons:
Note that this function is very weak against malicious strings; it's very easy to generate multiple keys that have the same hashcode. On the other hand, that hardly ever actually occurs and this function is very cheap, even by comparison with industry-standard hashes like FNV. If real strength of hash is required though, use a custom hash based on Bob Jenkins's lookup3(), but be aware that it's significantly slower. Tcl does not use that level of strength because it typically does not need it (and some of the aspects of that strength are genuinely unnecessary given the rest of Tcl's hash machinery, and the fact that we do not either transfer hashes to another machine, use them as a true substitute for equality, or attempt to minimize work in rebuilding the hash table).
HashStringKey
in tclHash.c
HashString
in tclLiteral.c
See [tcl-Feature Request #2958832]
sprint("%08X")
) in hex key | key from which to compute hash value. |
length | length from key, if "<0" the size will be computed |
kill syscall with libmkkernel error plugin
additional info: man 3 kill
[in] | fmtobj | managed object used to format the log-message (default=MK_NULL → use default-format) |
[in] | pid | the process to kill |
[in] | signal | the signal to send |
malloc syscall with libmkkernel error plugin
additional info: man malloc
[in] | fmtobj | managed object used to format the log-message (default=MK_NULL → use default-format) |
[in] | size | the size of the new memory block |
memdup syscall with libmkkernel error plugin
additional info: like strdup but for ordinary memory
[in] | fmtobj | managed object used to format the log-message (default=MK_NULL → use default-format) |
[in] | blck | the old memory block to duplicate |
[in] | size | the size of the memory in buf |
MK_EXTERN void MkSysPipeHandler | ( | MkSysPipeHandlerE | keepPipe | ) |
internal support for pipe ignore
sprintf syscall with libmkkernel error plugin
additional info: man sprintf
[in] | mkrt | the MkRuntimeS instance to work on - the runtime argument, used by MK_RT_CALL (C-only) |
[in] | format | the format string |
MK_EXTERN void MkSysPrintProcessMemoryMap_RT | ( | MK_RT | mkrt, |
MK_OBJN | fmtobj, | ||
MK_I32 const | debug, | ||
MK_STRN const | callfunc, | ||
MK_I32 const | lvl ) |
print memory map on DUMP
[in] | mkrt | the MkRuntimeS instance to work on - the runtime argument, used by MK_RT_CALL (C-only) |
[in] | fmtobj | managed object used to format the log-message (default=MK_NULL → use default-format) |
[in] | debug | the debug level from MkRuntimeS::debug, use 0 <= debug <= 9 (default=0 ) |
[in] | callfunc | a user-defined postfix to identify the calling function or the environment (default=name-of-function ) |
[in] | lvl | a user-defined prefix starting with "" for lvl=0 and increase with " " for lvl+1 (default=0 ) |
MK_EXTERN void MkSysPrintTrace_RT | ( | MK_RT | mkrt, |
MK_OBJN | fmtobj, | ||
MK_I32 | skip, | ||
MK_I32 const | num, | ||
MK_I32 const | debug, | ||
MK_STRN const | callfunc, | ||
MK_I32 const | lvl ) |
backtrace syscall with libmkkernel error plugin
Get a full stack backtrace. SKIP is the number of frames to skip; passing 0 will start the trace with the function calling backtrace_full. DATA is passed to the callback routine. If any call to CALLBACK returns a non-zero value, the stack backtrace stops, and backtrace returns that value; this may be used to limit the number of stack frames desired. If all calls to CALLBACK return 0, backtrace returns 0. The backtrace_full function will make at least one call to either CALLBACK or ERROR_CALLBACK. This function requires debug info for the executable.
[in] | mkrt | the MkRuntimeS instance to work on - the runtime argument, used by MK_RT_CALL (C-only) |
[in] | fmtobj | managed object used to format the log-message (default=MK_NULL → use default-format) |
[in] | skip | the number of of frames to skip |
[in] | num | the number of traces to print |
[in] | debug | the debug level from MkRuntimeS::debug, use 0 <= debug <= 9 (default=0 ) |
[in] | callfunc | a user-defined postfix to identify the calling function or the environment (default=name-of-function ) |
[in] | lvl | a user-defined prefix starting with "" for lvl=0 and increase with " " for lvl+1 (default=0 ) |
realloc syscall with libmkkernel error plugin
additional info: man realloc
[in] | fmtobj | managed object used to format the log-message (default=MK_NULL → use default-format) |
[in] | buf | the old memory block to extend |
[in] | size | the size of the new memory block |
MK_EXTERN 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
additional info: man realloc
but set the NEW bytes to '\0'
[in] | fmtobj | managed object used to format the log-message (default=MK_NULL → use default-format) |
[in] | buf | the old memory block to extend |
[in] | oldnum | the old number of the memory block items |
[in] | addnum | add addnum to oldnum of the memory block items, final number of items is newnum = oldnum + addnum |
[in] | size | the size of the memory block item |
sleep syscall with libmkkernel error plugin
[in] | fmtobj | managed object used to format the log-message (default=MK_NULL → use default-format) |
[in] | sec | the seconds to sleep |
Definition at line 2716 of file LibMkKernel_mk.h.
strdup syscall with libmkkernel error plugin
additional info: man strdup
[in] | fmtobj | managed object used to format the log-message (default=MK_NULL → use default-format) |
[in] | str | the string to duplicate |
MK_NULL
on error strdup syscall with libmkkernel error plugin
additional info: like strdup but for an array of string
[in] | fmtobj | managed object used to format the log-message (default=MK_NULL → use default-format) |
[in] | strA | the original array of strings |
get string NULL or VALUE …
Definition at line 2821 of file LibMkKernel_mk.h.
get string "" or VALUE …
Definition at line 2826 of file LibMkKernel_mk.h.
test if string(s) are equal …
|
inline |
test if string is NOT NULL or EMPTY …
Definition at line 2808 of file LibMkKernel_mk.h.
|
inline |
test if string is NULL or EMPTY …
Definition at line 2803 of file LibMkKernel_mk.h.
MK_EXTERN enum MkErrorE MkSysStrNCpy | ( | MK_OBJN | fmtobj, |
MK_STR const | to, | ||
MK_STRN const | from, | ||
MK_SIZE const | len ) |
strncpy syscall with libmkkernel error plugin
additional info: man strncpy
[in] | fmtobj | managed object used to format the log-message (default=MK_NULL → use default-format) |
[in] | to | the string to copy "to" |
[in] | from | the string to copy "from" |
[in] | len | the length of the string |
strndup syscall with libmkkernel error plugin
additional info: man strdup
[in] | fmtobj | managed object used to format the log-message (default=MK_NULL → use default-format) |
[in] | str | the string to duplicate |
[in] | len | the length of the string |
usleep syscall with libmkkernel error plugin
[in] | fmtobj | managed object used to format the log-message (default=MK_NULL → use default-format) |
[in] | usec | the micro (10^-6) seconds to sleep |
Definition at line 2705 of file LibMkKernel_mk.h.
wait for process or thread syscall with libmkkernel error plugin
[in] | fmtobj | managed object used to format the log-message (default=MK_NULL → use default-format) |
[in] | idP_out | process or thread handle |
Definition at line 2693 of file LibMkKernel_mk.h.
MK_EXTERN_DATA struct MkLalS MkLal |
Language Abstraction Layer in duty.
Definition at line 2486 of file LibMkKernel_mk.h.