Crate starina_api

Source
Expand description

Starina standard library for applications.

This is libstd in Starina. All components except the kernel use this library.

§APIs you should to know

Here are the most frequently used APIs that you will encounter first:

§Server APIs

Servers are long-running processes that provide services to clients, such as device drivers, filesystem drivers, TCP/IP stack, and so on.

  • Mainloop: An event loop for applications.

§Device driver APIs

In Starina, device drivers are servers with the hardware access. To control the hardware conveniently, Starina provides the following APIs:

  • MappedFolio: A physically-contiguous memory region for DMA/MMIO access.
  • Interrupt: Hardware interrupt handling.
  • starina_driver_utils::mmio: Type-safe MMIO access.
  • starina_driver_utils::DmaBufferPool: The DMA buffer pool allocator.

§Prelude

The prelude module contains the most common types and traits that you’ll use in Starina programs. Here is an idiomatic way to import the prelude:

use starina_api::prelude::*;

Re-exports§

Modules§

  • A message-passing channel.
  • Collections. HashMap, HashSet, VecDeque, BinaryHeap, and more.
  • Environ, a collection of key-value pairs passed to the application.
  • A contiguous page-aliged memory block.
  • Kernel object handle types.
  • A hardware interrupt object.
  • Logging utilities.
  • The mainloop for applications.
  • A polling API, similar to Linux’s epoll.
  • Frequently used types and traits.
  • Low-level printing utilities.
  • A semaphore-like API.
  • Synchronization primitives such as Arc and Weak.
  • Low-level system call interfaces.
  • A virtual address space object.

Macros§