Artifact 5c15d4cc4979d3340abaf466e746cee1e8a85b7fe85aaf30f804b23808a068e8:
- File kcore/stop.fn.c — part of check-in [6479e060a3] at 2019-07-26 09:51:02 on branch trunk — major update. fix ridiculous old type size determination mechanism. mmap is still broken and i'm not sure why; the syscall does not appear to be going through correctly - see posix_mmap, kmheapa, and kcore/testbin.exe.fn (user: lexi, size: 446) [annotate] [blame] [check-ins using]
/* kcore/stop.fn.c - kstop()
* ~ lexi hale <lexi@hale.su>
* this file defines a function that prematurely exits from
* a running libk program with an appropriate exit status. */
#include <k/core.h>
#include <k/def.h> // so we know what system this is
#include <k/type.h>
#ifdef KFenv_posix
# define STOPFN kio_posix_exit
extern noreturn void STOPFN(int);
#else
Knoimpl(kstop)
#endif
noreturn void kstop (stat_long code) { STOPFN(code); }