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.h | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) (limited to 'net/net_sys.h') diff --git a/net/net_sys.h b/net/net_sys.h index a296b41..3539bfc 100644 --- a/net/net_sys.h +++ b/net/net_sys.h @@ -1,7 +1,22 @@ /** * @file * - * this has to be provided and linked against the fool stack + * this functions need to be provided and linked against the fool stack. + * + * * memcpy(dst,src,x); - copy x bytes of memory to dst from src + * * klog(...); - printf style logger + * * addr=kballoc(x); - allocate x 4096 byte pages of memory + * * kbfree(addr); - free memory allocated with kballoc + * + * You only need to provide this functions, check the provided + * implementations for examples: + * + * * net_sys_linux - linux userspace + * * net_sys_foolos_kernel.h - standalone fool-os in-kernel */ -void* memcpy(void* restrict dstptr, const void* restrict srcptr, int size); +#ifdef FOOLOS_KERNEL +#include "net_sys_foolos_kernel.h" +#else +#include "net_sys_linux.h" +#endif -- cgit v1.2.3