Artifact c4373dead49dd8e049da0179626bb2b685a07ce9e6086c25b3b4f59a841f9336:
- File kcore/stop.fn.c — part of check-in [e794c5edef] at 2019-06-29 09:31:50 on branch trunk — add a bunch of code, port the header mechanism to gpp; add a fuckton of definitions and compatibility header code; notably, add core function kstop and x86.lin.{32,64} impl. update docs accordingly (user: lexi, size: 436) [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 void STOPFN(int);
#else
Knoimpl(kstop)
#endif
noreturn void kstop (longstat code) { STOPFN(code); }