Artifact c4d82c1a4af3d71b0b5e3119b8d582fb2785add4e7af679993be46903cafd93b:
- File kcore/testbin.exe.c — part of check-in [a8d93823f1] at 2019-08-18 13:42:35 on branch trunk — add functions, generate C syscall table (user: lexi, size: 529) [annotate] [blame] [check-ins using]
- File mod/kcore/testbin.exe.c — part of check-in [14172a910a] at 2019-08-21 06:00:24 on branch trunk — move modules to a subdirectory in order to keep the directory tree organized and make room for OS-specific build files (user: lexi, size: 529) [annotate] [blame] [check-ins using]
#include <k/core.h> #include <k/mem.h> #include <k/io.h> #include <k/magic.h> struct object { u8 a; s16 b; bool c; }; stat_long entry(kenv e) { const char msg[] = "hello from libk\n"; ksraw ptr = { Kmsz(msg), msg }; bool maybe = true; maybe = no; if (kiosend(e.std, ptr, null) == kiocond_ok) { /* great, continue */ } else { return kbad_io; } void* region = kmheapa(2048); if (region == null) return kbad_mem; kmzero(region,2048); if (kmheapf(region) >= kmcond_fail) return kbad_mem; return kbad_ok; }