reexport pod-derive in pod crate
This commit is contained in:
parent
4645986337
commit
78e72fd94a
|
@ -232,7 +232,6 @@ dependencies = [
|
|||
"lazy_static",
|
||||
"log",
|
||||
"pod",
|
||||
"pod-derive",
|
||||
"spin 0.9.4",
|
||||
]
|
||||
|
||||
|
@ -260,7 +259,6 @@ dependencies = [
|
|||
"linked_list_allocator",
|
||||
"log",
|
||||
"pod",
|
||||
"pod-derive",
|
||||
"spin 0.9.4",
|
||||
"uart_16550",
|
||||
"volatile",
|
||||
|
@ -280,7 +278,6 @@ dependencies = [
|
|||
"lazy_static",
|
||||
"log",
|
||||
"pod",
|
||||
"pod-derive",
|
||||
"spin 0.9.4",
|
||||
"virtio-input-decoder",
|
||||
]
|
||||
|
@ -296,7 +293,6 @@ dependencies = [
|
|||
"lazy_static",
|
||||
"log",
|
||||
"pod",
|
||||
"pod-derive",
|
||||
"spin 0.9.4",
|
||||
]
|
||||
|
||||
|
@ -327,7 +323,6 @@ dependencies = [
|
|||
"log",
|
||||
"lru",
|
||||
"pod",
|
||||
"pod-derive",
|
||||
"ringbuffer",
|
||||
"spin 0.9.4",
|
||||
"typeflags",
|
||||
|
@ -343,7 +338,6 @@ version = "0.1.0"
|
|||
dependencies = [
|
||||
"jinux-frame",
|
||||
"pod",
|
||||
"pod-derive",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
@ -357,7 +351,6 @@ dependencies = [
|
|||
"jinux-util",
|
||||
"log",
|
||||
"pod",
|
||||
"pod-derive",
|
||||
"spin 0.9.4",
|
||||
]
|
||||
|
||||
|
@ -452,6 +445,9 @@ checksum = "6f61fba1741ea2b3d6a1e3178721804bb716a68a6aeba1149b5d52e3d464ea66"
|
|||
[[package]]
|
||||
name = "pod"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"pod-derive",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "pod-derive"
|
||||
|
|
|
@ -16,7 +16,6 @@ bootloader = {version="0.10.12"}
|
|||
font8x8 = { version = "0.2.5", default-features = false, features = ["unicode"]}
|
||||
uart_16550 = "0.2.0"
|
||||
pod = {path = "../pod"}
|
||||
pod-derive = {path = "../pod-derive"}
|
||||
acpi= "4.1.1"
|
||||
intrusive-collections = "0.9.5"
|
||||
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
|
||||
|
||||
[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 array
|
||||
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-util = {path="../../libs/jinux-util"}
|
||||
pod = {path = "../../../framework/pod"}
|
||||
pod-derive = {path = "../../../framework/pod-derive"}
|
||||
component = {path="../../comp-sys/component"}
|
||||
log = "0.4"
|
||||
|
||||
|
|
|
@ -13,7 +13,6 @@ jinux-pci = {path="../pci"}
|
|||
jinux-virtio = {path="../virtio"}
|
||||
jinux-util = {path="../../libs/jinux-util"}
|
||||
pod = {path = "../../../framework/pod"}
|
||||
pod-derive = {path = "../../../framework/pod-derive"}
|
||||
component = {path="../../comp-sys/component"}
|
||||
virtio-input-decoder = "0.1.4"
|
||||
log = "0.4"
|
||||
|
|
|
@ -11,7 +11,6 @@ spin = "0.9.4"
|
|||
jinux-frame = {path = "../../../framework/jinux-frame"}
|
||||
jinux-util = {path="../../libs/jinux-util"}
|
||||
pod = {path = "../../../framework/pod"}
|
||||
pod-derive = {path = "../../../framework/pod-derive"}
|
||||
component = {path="../../comp-sys/component"}
|
||||
log = "0.4"
|
||||
|
||||
|
|
|
@ -9,7 +9,6 @@ extern crate alloc;
|
|||
|
||||
use component::init_component;
|
||||
use component::ComponentInitError;
|
||||
extern crate pod_derive;
|
||||
|
||||
use alloc::{sync::Arc, vec::Vec};
|
||||
use spin::{mutex::Mutex, Once};
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
use alloc::vec::Vec;
|
||||
use log::debug;
|
||||
use pod_derive::Pod;
|
||||
use pod::Pod;
|
||||
|
||||
use crate::util::{CSpaceAccessMethod, Location, BAR};
|
||||
|
||||
|
|
|
@ -12,7 +12,6 @@ jinux-frame = {path = "../../../framework/jinux-frame"}
|
|||
jinux-pci = {path="../pci"}
|
||||
jinux-util = {path="../../libs/jinux-util"}
|
||||
pod = {path = "../../../framework/pod"}
|
||||
pod-derive = {path = "../../../framework/pod-derive"}
|
||||
component = {path="../../comp-sys/component"}
|
||||
log = "0.4"
|
||||
|
||||
|
|
|
@ -4,6 +4,7 @@ use bitflags::bitflags;
|
|||
use jinux_pci::capability::vendor::virtio::CapabilityVirtioData;
|
||||
use jinux_pci::util::BAR;
|
||||
use jinux_util::frame_ptr::InFramePtr;
|
||||
use pod::Pod;
|
||||
|
||||
pub const BLK_SIZE: usize = 512;
|
||||
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
pub mod device;
|
||||
use jinux_pci::{capability::vendor::virtio::CapabilityVirtioData, util::BAR};
|
||||
use jinux_util::frame_ptr::InFramePtr;
|
||||
use pod::Pod;
|
||||
|
||||
/// Select value used for [`VirtIOInput::query_config_select()`].
|
||||
#[repr(u8)]
|
||||
|
|
|
@ -16,13 +16,11 @@ use jinux_frame::{offset_of, TrapFrame};
|
|||
use jinux_pci::util::{PCIDevice, BAR};
|
||||
use jinux_util::frame_ptr::InFramePtr;
|
||||
use log::{debug, info};
|
||||
use pod_derive::Pod;
|
||||
use pod::Pod;
|
||||
use spin::{Mutex, Once};
|
||||
|
||||
use crate::device::VirtioInfo;
|
||||
use jinux_pci::{capability::vendor::virtio::CapabilityVirtioData, msix::MSIX};
|
||||
#[macro_use]
|
||||
extern crate pod_derive;
|
||||
|
||||
pub mod device;
|
||||
pub mod queue;
|
||||
|
|
|
@ -10,6 +10,8 @@ use jinux_frame::{
|
|||
};
|
||||
use jinux_util::frame_ptr::InFramePtr;
|
||||
use log::debug;
|
||||
use pod::Pod;
|
||||
|
||||
#[derive(Debug)]
|
||||
pub enum QueueError {
|
||||
InvalidArgs,
|
||||
|
|
|
@ -8,7 +8,6 @@ edition = "2021"
|
|||
[dependencies]
|
||||
jinux-frame = {path = "../../../framework/jinux-frame"}
|
||||
pod = {path = "../../../framework/pod"}
|
||||
pod-derive = {path = "../../../framework/pod-derive"}
|
||||
jinux-input = {path="../../comps/input"}
|
||||
jinux-block = {path="../../comps/block"}
|
||||
controlled = { path = "../../comp-sys/controlled" }
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
|
||||
use super::IoEvents;
|
||||
use crate::fs::file_table::FileDescripter;
|
||||
use crate::prelude::*;
|
||||
pub type c_nfds = u64;
|
||||
|
||||
// https://github.com/torvalds/linux/blob/master/include/uapi/asm-generic/poll.h
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
#![allow(non_camel_case_types)]
|
||||
|
||||
use super::{Metadata, Timespec};
|
||||
use crate::prelude::*;
|
||||
|
||||
pub const S_IFMT: u32 = 0o170000;
|
||||
pub const S_IFCHR: u32 = 0o020000;
|
||||
|
|
|
@ -47,8 +47,6 @@ pub mod tty;
|
|||
mod user_apps;
|
||||
mod util;
|
||||
pub mod vm;
|
||||
#[macro_use]
|
||||
extern crate pod_derive;
|
||||
|
||||
pub fn init() {
|
||||
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::{print, println};
|
||||
pub(crate) use log::{debug, error, info, trace, warn};
|
||||
pub(crate) use pod::Pod;
|
||||
pub(crate) use spin::{Mutex, RwLock};
|
||||
|
||||
/// return current process
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
use crate::prelude::*;
|
||||
use jinux_frame::vm::VmIo;
|
||||
use pod::Pod;
|
||||
|
||||
/// 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<()> {
|
||||
|
|
|
@ -7,7 +7,6 @@ edition = "2021"
|
|||
|
||||
[dependencies]
|
||||
jinux-frame = {path = "../../../framework/jinux-frame"}
|
||||
pod-derive = {path = "../../../framework/pod-derive"}
|
||||
pod = {path = "../../../framework/pod"}
|
||||
|
||||
[features]
|
||||
|
|
Loading…
Reference in New Issue