An x86-64 operating system built from xv6, now largely rewritten: SMP, a copy-on-write root filesystem (SchFS), PCI/USB/virtio drivers, a TTF rasteriser, and a Linux-numbered syscall ABI. No history before this point -- the tree was never under version control. This commit exists so the rename that follows has something to undo to.
24 lines
422 B
C
24 lines
422 B
C
// SPDX-License-Identifier: Apache-2.0
|
|
// Schunix — first-party userland runtime: _start entry and exit.
|
|
|
|
#include "types.h"
|
|
#include "user.h"
|
|
|
|
extern void _xv6_exit(void);
|
|
|
|
void
|
|
exit(void)
|
|
{
|
|
_xv6_exit();
|
|
for (;;);
|
|
}
|
|
|
|
/* _start lives in lib/start.S — it must read incoming registers, which
|
|
* cannot be expressed portably in C. See that file. */
|
|
|
|
void
|
|
__stack_chk_fail(void)
|
|
{
|
|
_xv6_exit();
|
|
for (;;);
|
|
}
|