Crate os1 [] [src]

The os1 kernel is written and compiled as a library. It is then compiled and linked together with assembly files to produce a binary. The binary is written to the hard disk, which is then loaded.

The kernel is compiled without any libstd. Only libcore and liballoc are used, since they provide core Rust functionality.

Reexports

extern crate core as core;
extern crate alloc;
extern crate rlibc;
use core::prelude::v1::*;

Modules

bare_bones

This module contains some basic functionality that libstd would normally otherwise provide. Most importantly, it defines rust_begin_unwind which is used by panic!.

debug

This module allows the user to print to QEMU's serial console.

fs

A module for file system stuff

interrupts

This module contains everything needed for interrupts

io

A module for I/O stuff

linked_list

A doubly-linked list with owned nodes modified slightly from the std library.

machine

This is the Rust-side handle for assembly code. Most of the FFI handles are in this module.

memory

This module contains everything that has to do with memory

process

A module for process management

static_linked_list

A doubly-linked list with owned nodes modified slightly from the std library. This version can be used in statics and has a const constructor.

string

A simple String implementation

sync

A module for synchronization primitives

vec

A simple vector implementation

vga

This module contains a primitive display driver for the kernel while in VGA mode.

Macros

bootlog!

A macro for printing using format strings to the console when interrupts are not enabled

printf!

A macro for printing using format strings to the console when interrupts are enabled

Functions

_proc_yield

The unsafe function that does the actual work of choosing the next process and switching to it.

kernel_main

This is the entry point to the kernel. It is the first rust code that runs.

pic_irq

Rust-side IRQ handling code

store_kcontext

Save the KContext of the current process to its process struct

vmm_page_fault

The Rust-side code of the page fault handler.