Crate axns

source ·
Expand description

ArceOS namespaces module.

Namespaces are used to control system resource sharing between threads. This module provides a unified interface to access system resources in different scenarios.

For a unikernel, there is only one global namespace, so all threads share the same system resources, such as virtual address space, working directory, and file descriptors, etc.

For a monolithic kernel, each process corresponds to a namespace, all threads in the same process share the same system resources. Different processes have different namespaces and isolated resources.

For further container support, some global system resources can also be grouped into a namespace.

See the examples of def_resource! for more usage.

Macros§

Structs§

  • A namespace that contains all user-defined resources.
  • A helper type to easily manage shared resources.

Traits§

  • The interfaces need to be implemented when enable thread-local namespaces.

Functions§