mirror of
https://github.com/panpaul/tiny_os
synced 2024-09-20 09:45:19 +08:00
chore: rename api to uapi
This commit is contained in:
parent
a65176bc57
commit
f577370ee7
18
Cargo.lock
generated
18
Cargo.lock
generated
@ -18,14 +18,6 @@ dependencies = [
|
||||
"vspace",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "api"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"num-derive",
|
||||
"num-traits",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "autocfg"
|
||||
version = "1.2.0"
|
||||
@ -105,7 +97,6 @@ name = "kernel"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"allocator",
|
||||
"api",
|
||||
"bitflags 2.5.0",
|
||||
"cfg-if",
|
||||
"fdt",
|
||||
@ -116,6 +107,7 @@ dependencies = [
|
||||
"sbi-rt",
|
||||
"spin",
|
||||
"static_assertions",
|
||||
"uapi",
|
||||
"uart_16550",
|
||||
"utils",
|
||||
"vspace",
|
||||
@ -256,6 +248,14 @@ dependencies = [
|
||||
"unicode-ident",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "uapi"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"num-derive",
|
||||
"num-traits",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "uart_16550"
|
||||
version = "0.3.0"
|
||||
|
@ -1,6 +1,6 @@
|
||||
[workspace]
|
||||
resolver = "2"
|
||||
members = ["api", "kernel", "lib/*"]
|
||||
members = ["kernel", "lib/*", "uapi"]
|
||||
|
||||
[profile.dev]
|
||||
panic = "abort"
|
||||
|
@ -20,8 +20,8 @@ riscv = []
|
||||
"riscv.board.virt" = ["riscv.riscv64"]
|
||||
|
||||
[dependencies]
|
||||
uapi = { path = "../uapi" }
|
||||
allocator = { path = "../lib/allocator" }
|
||||
api = { path = "../api" }
|
||||
utils = { path = "../lib/utils", default-features = false }
|
||||
vspace = { path = "../lib/vspace", default-features = false }
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
use crate::objects::null::NullCap;
|
||||
use api::cap::ObjectType;
|
||||
use core::cell::Cell;
|
||||
use uapi::cap::ObjectType;
|
||||
use utils::{
|
||||
linked_list::{Link, LinkHelper},
|
||||
LinkHelperImpl,
|
||||
|
@ -3,7 +3,7 @@ use super::{
|
||||
Cap, KernelObject,
|
||||
};
|
||||
use crate::arch::layout::mmap_phys_to_virt;
|
||||
use api::{cap::ObjectType, error::CapFault};
|
||||
use uapi::{cap::ObjectType, error::CapFault};
|
||||
use utils::MASK;
|
||||
use vspace::addr::{AddressOps, PhysAddr};
|
||||
|
||||
|
@ -14,12 +14,12 @@
|
||||
|
||||
*/
|
||||
|
||||
use api::{
|
||||
use cap::CapEntry;
|
||||
use core::{marker::PhantomData, ptr::NonNull};
|
||||
use uapi::{
|
||||
cap::ObjectType,
|
||||
error::{SysError, SysResult},
|
||||
};
|
||||
use cap::CapEntry;
|
||||
use core::{marker::PhantomData, ptr::NonNull};
|
||||
|
||||
pub mod cap;
|
||||
pub mod cnode;
|
||||
@ -51,7 +51,7 @@ impl<'a, T: KernelObject + ?Sized> TryFrom<&'a CapEntry> for Cap<'a, T> {
|
||||
|
||||
impl<'a, T: KernelObject + ?Sized> Cap<'a, T> {
|
||||
pub fn append(&mut self, new: &mut CapEntry) {
|
||||
let next = self.cte.link.next();
|
||||
let next = self.cte.link.next_raw();
|
||||
|
||||
// update new cap's link
|
||||
new.link.set_prev(Some(NonNull::from(self.cte)));
|
||||
|
@ -1,6 +1,6 @@
|
||||
use super::cap::RawCap;
|
||||
use super::{Cap, KernelObject};
|
||||
use api::cap::ObjectType;
|
||||
use uapi::cap::ObjectType;
|
||||
use vspace::addr::PhysAddr;
|
||||
|
||||
/// NullObject is used as empty (capability) slot
|
||||
|
@ -2,8 +2,8 @@ use super::cap::RawCap;
|
||||
use super::cnode::{CNodeCap, CNodeObject};
|
||||
use super::null::NullCap;
|
||||
use super::{Cap, KernelObject};
|
||||
use api::cap::ObjectType;
|
||||
use api::error::{SysError, SysResult};
|
||||
use uapi::cap::ObjectType;
|
||||
use uapi::error::{SysError, SysResult};
|
||||
use utils::then::Then;
|
||||
use utils::MASK;
|
||||
use vspace::addr::{align_up, PhysAddr};
|
||||
|
@ -1,5 +1,5 @@
|
||||
[package]
|
||||
name = "api"
|
||||
name = "uapi"
|
||||
version = "0.1.0"
|
||||
edition = "2021"
|
||||
|
Loading…
Reference in New Issue
Block a user