Initial commit: Schunix as it stands before the SchOS rename
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.
This commit is contained in:
commit
d0f7acf9eb
275 changed files with 51417 additions and 0 deletions
24
lib/glue.c
Normal file
24
lib/glue.c
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
// 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 (;;);
|
||||
}
|
||||
Loading…
Reference in a new issue