From 330aa15e3e4a705eb8d168bc9c76af9b1b768dfc Mon Sep 17 00:00:00 2001 From: Miguel Date: Thu, 27 Sep 2018 01:43:43 +0200 Subject: user space compilation of fool stack --- net/net_sys_linux.h | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 net/net_sys_linux.h (limited to 'net/net_sys_linux.h') diff --git a/net/net_sys_linux.h b/net/net_sys_linux.h new file mode 100644 index 0000000..2f6b62a --- /dev/null +++ b/net/net_sys_linux.h @@ -0,0 +1,17 @@ +/** + * @file + * + * this has to be provided and linked against the fool stack + */ + +#include // provides printf for klog below +#include // provides malloc & free for kbfree & kballoc below +#include // provides memcpy + +//void* memcpy(void* restrict dstptr, const void* restrict srcptr, int size); +//#define klog(...) log(FOOLOS_LOG_COLOR,__FILE__ ":" S2(__LINE__), 10, LOG_LABEL_INFO __VA_ARGS__) +#define S1(x) #x +#define S2(x) S1(x) +#define klog(...) printf(__FILE__ ":" S2(__LINE__) __VA_ARGS__) +#define kbfree(x) free(x); +#define kballoc(x) malloc(x*4096); -- cgit v1.2.3