mirror of
https://github.com/asterinas/asterinas.git
synced 2025-06-14 07:46:48 +00:00
reexport pod-derive in pod crate
This commit is contained in:
parent
4645986337
commit
78e72fd94a
10
src/Cargo.lock
generated
10
src/Cargo.lock
generated
@ -232,7 +232,6 @@ dependencies = [
|
|||||||
"lazy_static",
|
"lazy_static",
|
||||||
"log",
|
"log",
|
||||||
"pod",
|
"pod",
|
||||||
"pod-derive",
|
|
||||||
"spin 0.9.4",
|
"spin 0.9.4",
|
||||||
]
|
]
|
||||||
|
|
||||||
@ -260,7 +259,6 @@ dependencies = [
|
|||||||
"linked_list_allocator",
|
"linked_list_allocator",
|
||||||
"log",
|
"log",
|
||||||
"pod",
|
"pod",
|
||||||
"pod-derive",
|
|
||||||
"spin 0.9.4",
|
"spin 0.9.4",
|
||||||
"uart_16550",
|
"uart_16550",
|
||||||
"volatile",
|
"volatile",
|
||||||
@ -280,7 +278,6 @@ dependencies = [
|
|||||||
"lazy_static",
|
"lazy_static",
|
||||||
"log",
|
"log",
|
||||||
"pod",
|
"pod",
|
||||||
"pod-derive",
|
|
||||||
"spin 0.9.4",
|
"spin 0.9.4",
|
||||||
"virtio-input-decoder",
|
"virtio-input-decoder",
|
||||||
]
|
]
|
||||||
@ -296,7 +293,6 @@ dependencies = [
|
|||||||
"lazy_static",
|
"lazy_static",
|
||||||
"log",
|
"log",
|
||||||
"pod",
|
"pod",
|
||||||
"pod-derive",
|
|
||||||
"spin 0.9.4",
|
"spin 0.9.4",
|
||||||
]
|
]
|
||||||
|
|
||||||
@ -327,7 +323,6 @@ dependencies = [
|
|||||||
"log",
|
"log",
|
||||||
"lru",
|
"lru",
|
||||||
"pod",
|
"pod",
|
||||||
"pod-derive",
|
|
||||||
"ringbuffer",
|
"ringbuffer",
|
||||||
"spin 0.9.4",
|
"spin 0.9.4",
|
||||||
"typeflags",
|
"typeflags",
|
||||||
@ -343,7 +338,6 @@ version = "0.1.0"
|
|||||||
dependencies = [
|
dependencies = [
|
||||||
"jinux-frame",
|
"jinux-frame",
|
||||||
"pod",
|
"pod",
|
||||||
"pod-derive",
|
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
@ -357,7 +351,6 @@ dependencies = [
|
|||||||
"jinux-util",
|
"jinux-util",
|
||||||
"log",
|
"log",
|
||||||
"pod",
|
"pod",
|
||||||
"pod-derive",
|
|
||||||
"spin 0.9.4",
|
"spin 0.9.4",
|
||||||
]
|
]
|
||||||
|
|
||||||
@ -452,6 +445,9 @@ checksum = "6f61fba1741ea2b3d6a1e3178721804bb716a68a6aeba1149b5d52e3d464ea66"
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "pod"
|
name = "pod"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
|
dependencies = [
|
||||||
|
"pod-derive",
|
||||||
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "pod-derive"
|
name = "pod-derive"
|
||||||
|
@ -16,7 +16,6 @@ bootloader = {version="0.10.12"}
|
|||||||
font8x8 = { version = "0.2.5", default-features = false, features = ["unicode"]}
|
font8x8 = { version = "0.2.5", default-features = false, features = ["unicode"]}
|
||||||
uart_16550 = "0.2.0"
|
uart_16550 = "0.2.0"
|
||||||
pod = {path = "../pod"}
|
pod = {path = "../pod"}
|
||||||
pod-derive = {path = "../pod-derive"}
|
|
||||||
acpi= "4.1.1"
|
acpi= "4.1.1"
|
||||||
intrusive-collections = "0.9.5"
|
intrusive-collections = "0.9.5"
|
||||||
log= "0.4"
|
log= "0.4"
|
||||||
|
@ -6,3 +6,8 @@ edition = "2021"
|
|||||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
|
pod-derive = {path = "../pod-derive", optional = true}
|
||||||
|
|
||||||
|
[features]
|
||||||
|
default = ["derive"]
|
||||||
|
derive = ["pod-derive"]
|
||||||
|
@ -64,3 +64,6 @@ macro_rules! impl_pod_for {
|
|||||||
impl_pod_for!(u8, u16, u32, u64, i8, i16, i32, i64, isize, usize);
|
impl_pod_for!(u8, u16, u32, u64, i8, i16, i32, i64, isize, usize);
|
||||||
// impl Pod for array
|
// impl Pod for array
|
||||||
unsafe impl<T: Pod, const N: usize> Pod for [T; N] {}
|
unsafe impl<T: Pod, const N: usize> Pod for [T; N] {}
|
||||||
|
|
||||||
|
#[cfg(feature = "derive")]
|
||||||
|
pub use pod_derive::*;
|
||||||
|
@ -13,7 +13,6 @@ jinux-pci = {path="../pci"}
|
|||||||
jinux-virtio = {path="../virtio"}
|
jinux-virtio = {path="../virtio"}
|
||||||
jinux-util = {path="../../libs/jinux-util"}
|
jinux-util = {path="../../libs/jinux-util"}
|
||||||
pod = {path = "../../../framework/pod"}
|
pod = {path = "../../../framework/pod"}
|
||||||
pod-derive = {path = "../../../framework/pod-derive"}
|
|
||||||
component = {path="../../comp-sys/component"}
|
component = {path="../../comp-sys/component"}
|
||||||
log = "0.4"
|
log = "0.4"
|
||||||
|
|
||||||
|
@ -13,7 +13,6 @@ jinux-pci = {path="../pci"}
|
|||||||
jinux-virtio = {path="../virtio"}
|
jinux-virtio = {path="../virtio"}
|
||||||
jinux-util = {path="../../libs/jinux-util"}
|
jinux-util = {path="../../libs/jinux-util"}
|
||||||
pod = {path = "../../../framework/pod"}
|
pod = {path = "../../../framework/pod"}
|
||||||
pod-derive = {path = "../../../framework/pod-derive"}
|
|
||||||
component = {path="../../comp-sys/component"}
|
component = {path="../../comp-sys/component"}
|
||||||
virtio-input-decoder = "0.1.4"
|
virtio-input-decoder = "0.1.4"
|
||||||
log = "0.4"
|
log = "0.4"
|
||||||
|
@ -11,7 +11,6 @@ spin = "0.9.4"
|
|||||||
jinux-frame = {path = "../../../framework/jinux-frame"}
|
jinux-frame = {path = "../../../framework/jinux-frame"}
|
||||||
jinux-util = {path="../../libs/jinux-util"}
|
jinux-util = {path="../../libs/jinux-util"}
|
||||||
pod = {path = "../../../framework/pod"}
|
pod = {path = "../../../framework/pod"}
|
||||||
pod-derive = {path = "../../../framework/pod-derive"}
|
|
||||||
component = {path="../../comp-sys/component"}
|
component = {path="../../comp-sys/component"}
|
||||||
log = "0.4"
|
log = "0.4"
|
||||||
|
|
||||||
|
@ -9,7 +9,6 @@ extern crate alloc;
|
|||||||
|
|
||||||
use component::init_component;
|
use component::init_component;
|
||||||
use component::ComponentInitError;
|
use component::ComponentInitError;
|
||||||
extern crate pod_derive;
|
|
||||||
|
|
||||||
use alloc::{sync::Arc, vec::Vec};
|
use alloc::{sync::Arc, vec::Vec};
|
||||||
use spin::{mutex::Mutex, Once};
|
use spin::{mutex::Mutex, Once};
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
use alloc::vec::Vec;
|
use alloc::vec::Vec;
|
||||||
use log::debug;
|
use log::debug;
|
||||||
use pod_derive::Pod;
|
use pod::Pod;
|
||||||
|
|
||||||
use crate::util::{CSpaceAccessMethod, Location, BAR};
|
use crate::util::{CSpaceAccessMethod, Location, BAR};
|
||||||
|
|
||||||
|
@ -12,7 +12,6 @@ jinux-frame = {path = "../../../framework/jinux-frame"}
|
|||||||
jinux-pci = {path="../pci"}
|
jinux-pci = {path="../pci"}
|
||||||
jinux-util = {path="../../libs/jinux-util"}
|
jinux-util = {path="../../libs/jinux-util"}
|
||||||
pod = {path = "../../../framework/pod"}
|
pod = {path = "../../../framework/pod"}
|
||||||
pod-derive = {path = "../../../framework/pod-derive"}
|
|
||||||
component = {path="../../comp-sys/component"}
|
component = {path="../../comp-sys/component"}
|
||||||
log = "0.4"
|
log = "0.4"
|
||||||
|
|
||||||
|
@ -4,6 +4,7 @@ use bitflags::bitflags;
|
|||||||
use jinux_pci::capability::vendor::virtio::CapabilityVirtioData;
|
use jinux_pci::capability::vendor::virtio::CapabilityVirtioData;
|
||||||
use jinux_pci::util::BAR;
|
use jinux_pci::util::BAR;
|
||||||
use jinux_util::frame_ptr::InFramePtr;
|
use jinux_util::frame_ptr::InFramePtr;
|
||||||
|
use pod::Pod;
|
||||||
|
|
||||||
pub const BLK_SIZE: usize = 512;
|
pub const BLK_SIZE: usize = 512;
|
||||||
|
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
pub mod device;
|
pub mod device;
|
||||||
use jinux_pci::{capability::vendor::virtio::CapabilityVirtioData, util::BAR};
|
use jinux_pci::{capability::vendor::virtio::CapabilityVirtioData, util::BAR};
|
||||||
use jinux_util::frame_ptr::InFramePtr;
|
use jinux_util::frame_ptr::InFramePtr;
|
||||||
|
use pod::Pod;
|
||||||
|
|
||||||
/// Select value used for [`VirtIOInput::query_config_select()`].
|
/// Select value used for [`VirtIOInput::query_config_select()`].
|
||||||
#[repr(u8)]
|
#[repr(u8)]
|
||||||
|
@ -16,13 +16,11 @@ use jinux_frame::{offset_of, TrapFrame};
|
|||||||
use jinux_pci::util::{PCIDevice, BAR};
|
use jinux_pci::util::{PCIDevice, BAR};
|
||||||
use jinux_util::frame_ptr::InFramePtr;
|
use jinux_util::frame_ptr::InFramePtr;
|
||||||
use log::{debug, info};
|
use log::{debug, info};
|
||||||
use pod_derive::Pod;
|
use pod::Pod;
|
||||||
use spin::{Mutex, Once};
|
use spin::{Mutex, Once};
|
||||||
|
|
||||||
use crate::device::VirtioInfo;
|
use crate::device::VirtioInfo;
|
||||||
use jinux_pci::{capability::vendor::virtio::CapabilityVirtioData, msix::MSIX};
|
use jinux_pci::{capability::vendor::virtio::CapabilityVirtioData, msix::MSIX};
|
||||||
#[macro_use]
|
|
||||||
extern crate pod_derive;
|
|
||||||
|
|
||||||
pub mod device;
|
pub mod device;
|
||||||
pub mod queue;
|
pub mod queue;
|
||||||
|
@ -10,6 +10,8 @@ use jinux_frame::{
|
|||||||
};
|
};
|
||||||
use jinux_util::frame_ptr::InFramePtr;
|
use jinux_util::frame_ptr::InFramePtr;
|
||||||
use log::debug;
|
use log::debug;
|
||||||
|
use pod::Pod;
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug)]
|
||||||
pub enum QueueError {
|
pub enum QueueError {
|
||||||
InvalidArgs,
|
InvalidArgs,
|
||||||
|
@ -8,7 +8,6 @@ edition = "2021"
|
|||||||
[dependencies]
|
[dependencies]
|
||||||
jinux-frame = {path = "../../../framework/jinux-frame"}
|
jinux-frame = {path = "../../../framework/jinux-frame"}
|
||||||
pod = {path = "../../../framework/pod"}
|
pod = {path = "../../../framework/pod"}
|
||||||
pod-derive = {path = "../../../framework/pod-derive"}
|
|
||||||
jinux-input = {path="../../comps/input"}
|
jinux-input = {path="../../comps/input"}
|
||||||
jinux-block = {path="../../comps/block"}
|
jinux-block = {path="../../comps/block"}
|
||||||
controlled = { path = "../../comp-sys/controlled" }
|
controlled = { path = "../../comp-sys/controlled" }
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
|
|
||||||
use super::IoEvents;
|
use super::IoEvents;
|
||||||
use crate::fs::file_table::FileDescripter;
|
use crate::fs::file_table::FileDescripter;
|
||||||
|
use crate::prelude::*;
|
||||||
pub type c_nfds = u64;
|
pub type c_nfds = u64;
|
||||||
|
|
||||||
// https://github.com/torvalds/linux/blob/master/include/uapi/asm-generic/poll.h
|
// https://github.com/torvalds/linux/blob/master/include/uapi/asm-generic/poll.h
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
#![allow(non_camel_case_types)]
|
#![allow(non_camel_case_types)]
|
||||||
|
|
||||||
use super::{Metadata, Timespec};
|
use super::{Metadata, Timespec};
|
||||||
|
use crate::prelude::*;
|
||||||
|
|
||||||
pub const S_IFMT: u32 = 0o170000;
|
pub const S_IFMT: u32 = 0o170000;
|
||||||
pub const S_IFCHR: u32 = 0o020000;
|
pub const S_IFCHR: u32 = 0o020000;
|
||||||
|
@ -47,8 +47,6 @@ pub mod tty;
|
|||||||
mod user_apps;
|
mod user_apps;
|
||||||
mod util;
|
mod util;
|
||||||
pub mod vm;
|
pub mod vm;
|
||||||
#[macro_use]
|
|
||||||
extern crate pod_derive;
|
|
||||||
|
|
||||||
pub fn init() {
|
pub fn init() {
|
||||||
jinux_frame::disable_interrupts();
|
jinux_frame::disable_interrupts();
|
||||||
|
@ -16,6 +16,7 @@ pub(crate) use jinux_frame::config::PAGE_SIZE;
|
|||||||
pub(crate) use jinux_frame::vm::Vaddr;
|
pub(crate) use jinux_frame::vm::Vaddr;
|
||||||
pub(crate) use jinux_frame::{print, println};
|
pub(crate) use jinux_frame::{print, println};
|
||||||
pub(crate) use log::{debug, error, info, trace, warn};
|
pub(crate) use log::{debug, error, info, trace, warn};
|
||||||
|
pub(crate) use pod::Pod;
|
||||||
pub(crate) use spin::{Mutex, RwLock};
|
pub(crate) use spin::{Mutex, RwLock};
|
||||||
|
|
||||||
/// return current process
|
/// return current process
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
use crate::prelude::*;
|
use crate::prelude::*;
|
||||||
use jinux_frame::vm::VmIo;
|
use jinux_frame::vm::VmIo;
|
||||||
use pod::Pod;
|
|
||||||
|
|
||||||
/// copy bytes from user space of current process. The bytes len is the len of dest.
|
/// copy bytes from user space of current process. The bytes len is the len of dest.
|
||||||
pub fn read_bytes_from_user(src: Vaddr, dest: &mut [u8]) -> Result<()> {
|
pub fn read_bytes_from_user(src: Vaddr, dest: &mut [u8]) -> Result<()> {
|
||||||
|
@ -7,7 +7,6 @@ edition = "2021"
|
|||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
jinux-frame = {path = "../../../framework/jinux-frame"}
|
jinux-frame = {path = "../../../framework/jinux-frame"}
|
||||||
pod-derive = {path = "../../../framework/pod-derive"}
|
|
||||||
pod = {path = "../../../framework/pod"}
|
pod = {path = "../../../framework/pod"}
|
||||||
|
|
||||||
[features]
|
[features]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user