mirror of
https://github.com/asterinas/asterinas.git
synced 2025-06-21 16:33:24 +00:00
Use #[expect(lint)]
, not #[allow(lint)]
This commit is contained in:
committed by
Tate, Hongliang Tian
parent
1899646391
commit
0dca168717
@ -31,9 +31,9 @@ fn framebuffer_init() -> Result<(), ComponentInitError> {
|
|||||||
pub(crate) static WRITER: Once<SpinLock<Writer>> = Once::new();
|
pub(crate) static WRITER: Once<SpinLock<Writer>> = Once::new();
|
||||||
|
|
||||||
// ignore the warnings since we use the `todo!` macro.
|
// ignore the warnings since we use the `todo!` macro.
|
||||||
#[allow(unused_variables)]
|
#[expect(unused_variables)]
|
||||||
#[allow(unreachable_code)]
|
#[expect(unreachable_code)]
|
||||||
#[allow(clippy::diverging_sub_expression)]
|
#[expect(clippy::diverging_sub_expression)]
|
||||||
pub(crate) fn init() {
|
pub(crate) fn init() {
|
||||||
let mut writer = {
|
let mut writer = {
|
||||||
let Some(framebuffer) = boot_info().framebuffer_arg else {
|
let Some(framebuffer) = boot_info().framebuffer_arg else {
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
#![feature(let_chains)]
|
#![feature(let_chains)]
|
||||||
#![feature(negative_impls)]
|
#![feature(negative_impls)]
|
||||||
#![feature(slice_as_chunks)]
|
#![feature(slice_as_chunks)]
|
||||||
#![allow(dead_code, unused_imports)]
|
#![expect(dead_code, unused_imports)]
|
||||||
|
|
||||||
mod error;
|
mod error;
|
||||||
mod layers;
|
mod layers;
|
||||||
|
@ -21,7 +21,7 @@ use crate::{
|
|||||||
};
|
};
|
||||||
|
|
||||||
/// A transaction provider.
|
/// A transaction provider.
|
||||||
#[allow(clippy::type_complexity)]
|
#[expect(clippy::type_complexity)]
|
||||||
pub struct TxProvider {
|
pub struct TxProvider {
|
||||||
id: u64,
|
id: u64,
|
||||||
initializer_map: RwLock<HashMap<TypeId, Box<dyn Any + Send + Sync>>>,
|
initializer_map: RwLock<HashMap<TypeId, Box<dyn Any + Send + Sync>>>,
|
||||||
|
@ -40,7 +40,7 @@ use crate::prelude::*;
|
|||||||
/// // The deletion operation will be carried out when it is dropped
|
/// // The deletion operation will be carried out when it is dropped
|
||||||
/// drop(lazy_delete_u32);
|
/// drop(lazy_delete_u32);
|
||||||
/// ```
|
/// ```
|
||||||
#[allow(clippy::type_complexity)]
|
#[expect(clippy::type_complexity)]
|
||||||
pub struct LazyDelete<T> {
|
pub struct LazyDelete<T> {
|
||||||
obj: T,
|
obj: T,
|
||||||
is_deleted: AtomicBool,
|
is_deleted: AtomicBool,
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
// SPDX-License-Identifier: MPL-2.0
|
// SPDX-License-Identifier: MPL-2.0
|
||||||
|
|
||||||
#![allow(unused)]
|
#![expect(unused)]
|
||||||
|
|
||||||
use alloc::{
|
use alloc::{
|
||||||
collections::VecDeque,
|
collections::VecDeque,
|
||||||
|
@ -80,7 +80,7 @@ impl Taskless {
|
|||||||
// Since the same taskless will not be executed concurrently,
|
// Since the same taskless will not be executed concurrently,
|
||||||
// it is safe to use a `RefCell` here though the `Taskless` will
|
// it is safe to use a `RefCell` here though the `Taskless` will
|
||||||
// be put into an `Arc`.
|
// be put into an `Arc`.
|
||||||
#[allow(clippy::arc_with_non_send_sync)]
|
#[expect(clippy::arc_with_non_send_sync)]
|
||||||
Arc::new(Self {
|
Arc::new(Self {
|
||||||
is_scheduled: AtomicBool::new(false),
|
is_scheduled: AtomicBool::new(false),
|
||||||
is_running: AtomicBool::new(false),
|
is_running: AtomicBool::new(false),
|
||||||
|
@ -75,7 +75,7 @@ pub struct InputDevice {
|
|||||||
event_queue: SpinLock<VirtQueue>,
|
event_queue: SpinLock<VirtQueue>,
|
||||||
status_queue: VirtQueue,
|
status_queue: VirtQueue,
|
||||||
event_table: EventTable,
|
event_table: EventTable,
|
||||||
#[allow(clippy::type_complexity)]
|
#[expect(clippy::type_complexity)]
|
||||||
callbacks: RwLock<Vec<Arc<dyn Fn(InputEvent) + Send + Sync + 'static>>, LocalIrqDisabled>,
|
callbacks: RwLock<Vec<Arc<dyn Fn(InputEvent) + Send + Sync + 'static>>, LocalIrqDisabled>,
|
||||||
transport: SpinLock<Box<dyn VirtioTransport>>,
|
transport: SpinLock<Box<dyn VirtioTransport>>,
|
||||||
}
|
}
|
||||||
|
@ -34,7 +34,7 @@ bitflags! {
|
|||||||
|
|
||||||
#[repr(u8)]
|
#[repr(u8)]
|
||||||
#[derive(Default, Debug, Clone, Copy, TryFromInt)]
|
#[derive(Default, Debug, Clone, Copy, TryFromInt)]
|
||||||
#[allow(non_camel_case_types)]
|
#[expect(non_camel_case_types)]
|
||||||
pub enum GsoType {
|
pub enum GsoType {
|
||||||
#[default]
|
#[default]
|
||||||
VIRTIO_NET_HDR_GSO_NONE = 0,
|
VIRTIO_NET_HDR_GSO_NONE = 0,
|
||||||
|
@ -11,7 +11,7 @@ use ostd::bus::pci::{
|
|||||||
|
|
||||||
#[derive(Debug, Clone, PartialEq, Eq, PartialOrd, Ord)]
|
#[derive(Debug, Clone, PartialEq, Eq, PartialOrd, Ord)]
|
||||||
#[repr(u8)]
|
#[repr(u8)]
|
||||||
#[allow(clippy::enum_variant_names)]
|
#[expect(clippy::enum_variant_names)]
|
||||||
pub enum VirtioPciCpabilityType {
|
pub enum VirtioPciCpabilityType {
|
||||||
CommonCfg = 1,
|
CommonCfg = 1,
|
||||||
NotifyCfg = 2,
|
NotifyCfg = 2,
|
||||||
|
@ -268,7 +268,7 @@ impl VirtioTransport for VirtioPciModernTransport {
|
|||||||
}
|
}
|
||||||
|
|
||||||
impl VirtioPciModernTransport {
|
impl VirtioPciModernTransport {
|
||||||
#[allow(clippy::result_large_err)]
|
#[expect(clippy::result_large_err)]
|
||||||
pub(super) fn new(
|
pub(super) fn new(
|
||||||
common_device: PciCommonDevice,
|
common_device: PciCommonDevice,
|
||||||
) -> Result<Self, (BusProbeError, PciCommonDevice)> {
|
) -> Result<Self, (BusProbeError, PciCommonDevice)> {
|
||||||
|
@ -73,7 +73,7 @@ pub struct VirtioPciLegacyTransport {
|
|||||||
impl VirtioPciLegacyTransport {
|
impl VirtioPciLegacyTransport {
|
||||||
pub const QUEUE_ALIGN_SIZE: usize = 4096;
|
pub const QUEUE_ALIGN_SIZE: usize = 4096;
|
||||||
|
|
||||||
#[allow(clippy::result_large_err)]
|
#[expect(clippy::result_large_err)]
|
||||||
pub(super) fn new(
|
pub(super) fn new(
|
||||||
common_device: PciCommonDevice,
|
common_device: PciCommonDevice,
|
||||||
) -> Result<Self, (BusProbeError, PciCommonDevice)> {
|
) -> Result<Self, (BusProbeError, PciCommonDevice)> {
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
// SPDX-License-Identifier: MPL-2.0
|
// SPDX-License-Identifier: MPL-2.0
|
||||||
|
|
||||||
mod common;
|
mod common;
|
||||||
#[allow(clippy::module_inception)]
|
#[expect(clippy::module_inception)]
|
||||||
mod iface;
|
mod iface;
|
||||||
mod phy;
|
mod phy;
|
||||||
mod poll;
|
mod poll;
|
||||||
|
@ -70,14 +70,14 @@ pub fn expand_require(item: RequireItem, mut require_attr: RequireAttr) -> Token
|
|||||||
RequireItem::Impl(item_impl) => {
|
RequireItem::Impl(item_impl) => {
|
||||||
let new_item_impl = require_attr.fold_item_impl(item_impl);
|
let new_item_impl = require_attr.fold_item_impl(item_impl);
|
||||||
quote!(
|
quote!(
|
||||||
#[allow(clippy::multiple_bound_locations)]
|
#[expect(clippy::multiple_bound_locations)]
|
||||||
#new_item_impl
|
#new_item_impl
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
RequireItem::Fn(item_fn) => {
|
RequireItem::Fn(item_fn) => {
|
||||||
let new_item_fn = require_attr.fold_item_fn(item_fn);
|
let new_item_fn = require_attr.fold_item_fn(item_fn);
|
||||||
quote!(
|
quote!(
|
||||||
#[allow(clippy::multiple_bound_locations)]
|
#[expect(clippy::multiple_bound_locations)]
|
||||||
#new_item_fn
|
#new_item_fn
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
@ -80,7 +80,7 @@ impl rustc_driver::Callbacks for DefaultCallbacks {}
|
|||||||
struct ComponentCallbacks;
|
struct ComponentCallbacks;
|
||||||
impl rustc_driver::Callbacks for ComponentCallbacks {
|
impl rustc_driver::Callbacks for ComponentCallbacks {
|
||||||
// JUSTIFICATION: necessary to set `mir_opt_level`
|
// JUSTIFICATION: necessary to set `mir_opt_level`
|
||||||
#[allow(rustc::bad_opt_access)]
|
#[expect(rustc::bad_opt_access)]
|
||||||
fn config(&mut self, config: &mut interface::Config) {
|
fn config(&mut self, config: &mut interface::Config) {
|
||||||
let conf_path = analysis::lookup_conf_file();
|
let conf_path = analysis::lookup_conf_file();
|
||||||
let conf_path_string = if let Ok(Some(path)) = &conf_path {
|
let conf_path_string = if let Ok(Some(path)) = &conf_path {
|
||||||
@ -179,7 +179,7 @@ fn report_ice(info: &panic::PanicInfo<'_>) {
|
|||||||
interface::try_print_query_stack(&handler, num_frames);
|
interface::try_print_query_stack(&handler, num_frames);
|
||||||
}
|
}
|
||||||
|
|
||||||
#[allow(clippy::too_many_lines)]
|
#[expect(clippy::too_many_lines)]
|
||||||
pub fn main() {
|
pub fn main() {
|
||||||
rustc_driver::init_rustc_env_logger();
|
rustc_driver::init_rustc_env_logger();
|
||||||
LazyLock::force(&ICE_HOOK);
|
LazyLock::force(&ICE_HOOK);
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
// Licensed under the Apache License, Version 2.0 or the MIT License.
|
// Licensed under the Apache License, Version 2.0 or the MIT License.
|
||||||
// Copyright (C) 2023-2024 Ant Group.
|
// Copyright (C) 2023-2024 Ant Group.
|
||||||
|
|
||||||
#![allow(unused)]
|
#![expect(unused)]
|
||||||
|
|
||||||
use std::path::PathBuf;
|
use std::path::PathBuf;
|
||||||
use std::process::Command;
|
use std::process::Command;
|
||||||
|
@ -248,7 +248,7 @@ impl<T> KeyableWeak<T> {
|
|||||||
/// Constructs a new `KeyableWeak<T>`, without allocating any memory.
|
/// Constructs a new `KeyableWeak<T>`, without allocating any memory.
|
||||||
/// Calling `upgrade` on the return value always gives `None`.
|
/// Calling `upgrade` on the return value always gives `None`.
|
||||||
#[inline]
|
#[inline]
|
||||||
#[allow(clippy::new_without_default)]
|
#[expect(clippy::new_without_default)]
|
||||||
pub fn new() -> Self {
|
pub fn new() -> Self {
|
||||||
Self(Weak::new())
|
Self(Weak::new())
|
||||||
}
|
}
|
||||||
|
@ -17,7 +17,7 @@ pub trait Set {}
|
|||||||
pub struct Cons<T, S: Set>(PhantomData<(T, S)>);
|
pub struct Cons<T, S: Set>(PhantomData<(T, S)>);
|
||||||
|
|
||||||
impl<T, S: Set> Cons<T, S> {
|
impl<T, S: Set> Cons<T, S> {
|
||||||
#[allow(clippy::new_without_default)]
|
#[expect(clippy::new_without_default)]
|
||||||
pub fn new() -> Self {
|
pub fn new() -> Self {
|
||||||
Cons(PhantomData)
|
Cons(PhantomData)
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
// SPDX-License-Identifier: MPL-2.0
|
// SPDX-License-Identifier: MPL-2.0
|
||||||
|
|
||||||
#![allow(unused_variables)]
|
#![expect(unused_variables)]
|
||||||
|
|
||||||
use super::*;
|
use super::*;
|
||||||
use crate::{
|
use crate::{
|
||||||
|
@ -10,7 +10,7 @@ use crate::{
|
|||||||
prelude::*,
|
prelude::*,
|
||||||
};
|
};
|
||||||
|
|
||||||
#[allow(clippy::module_inception)]
|
#[expect(clippy::module_inception)]
|
||||||
mod pty;
|
mod pty;
|
||||||
|
|
||||||
pub use pty::{PtyMaster, PtySlave};
|
pub use pty::{PtyMaster, PtySlave};
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
// SPDX-License-Identifier: MPL-2.0
|
// SPDX-License-Identifier: MPL-2.0
|
||||||
|
|
||||||
#![allow(unused_variables)]
|
#![expect(unused_variables)]
|
||||||
|
|
||||||
use crate::{
|
use crate::{
|
||||||
events::IoEvents,
|
events::IoEvents,
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
// SPDX-License-Identifier: MPL-2.0
|
// SPDX-License-Identifier: MPL-2.0
|
||||||
|
|
||||||
#![allow(unused_variables)]
|
#![expect(unused_variables)]
|
||||||
|
|
||||||
use crate::{
|
use crate::{
|
||||||
events::IoEvents,
|
events::IoEvents,
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
// SPDX-License-Identifier: MPL-2.0
|
// SPDX-License-Identifier: MPL-2.0
|
||||||
|
|
||||||
#![allow(dead_code)]
|
#![expect(dead_code)]
|
||||||
|
|
||||||
use ostd::mm::{Infallible, VmReader};
|
use ostd::mm::{Infallible, VmReader};
|
||||||
use spin::Once;
|
use spin::Once;
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
// SPDX-License-Identifier: MPL-2.0
|
// SPDX-License-Identifier: MPL-2.0
|
||||||
|
|
||||||
#![allow(unused_variables)]
|
#![expect(unused_variables)]
|
||||||
|
|
||||||
use alloc::format;
|
use alloc::format;
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
// SPDX-License-Identifier: MPL-2.0
|
// SPDX-License-Identifier: MPL-2.0
|
||||||
|
|
||||||
#![allow(dead_code)]
|
#![expect(dead_code)]
|
||||||
|
|
||||||
use ostd::early_print;
|
use ostd::early_print;
|
||||||
use spin::Once;
|
use spin::Once;
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
// SPDX-License-Identifier: MPL-2.0
|
// SPDX-License-Identifier: MPL-2.0
|
||||||
|
|
||||||
#![allow(dead_code)]
|
#![expect(dead_code)]
|
||||||
#![allow(non_camel_case_types)]
|
#![expect(non_camel_case_types)]
|
||||||
|
|
||||||
use crate::prelude::*;
|
use crate::prelude::*;
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
// SPDX-License-Identifier: MPL-2.0
|
// SPDX-License-Identifier: MPL-2.0
|
||||||
|
|
||||||
#![allow(unused_variables)]
|
#![expect(unused_variables)]
|
||||||
|
|
||||||
use crate::{
|
use crate::{
|
||||||
events::IoEvents,
|
events::IoEvents,
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
// SPDX-License-Identifier: MPL-2.0
|
// SPDX-License-Identifier: MPL-2.0
|
||||||
|
|
||||||
#![allow(unused_variables)]
|
#![expect(unused_variables)]
|
||||||
|
|
||||||
use super::*;
|
use super::*;
|
||||||
use crate::{
|
use crate::{
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
// SPDX-License-Identifier: MPL-2.0
|
// SPDX-License-Identifier: MPL-2.0
|
||||||
|
|
||||||
#![allow(dead_code)]
|
#![expect(dead_code)]
|
||||||
|
|
||||||
/// Error number.
|
/// Error number.
|
||||||
#[repr(i32)]
|
#[repr(i32)]
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
// SPDX-License-Identifier: MPL-2.0
|
// SPDX-License-Identifier: MPL-2.0
|
||||||
|
|
||||||
#[allow(clippy::module_inception)]
|
#[expect(clippy::module_inception)]
|
||||||
mod events;
|
mod events;
|
||||||
mod io_events;
|
mod io_events;
|
||||||
mod observer;
|
mod observer;
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
// SPDX-License-Identifier: MPL-2.0
|
// SPDX-License-Identifier: MPL-2.0
|
||||||
|
|
||||||
#![allow(unused_variables)]
|
#![expect(unused_variables)]
|
||||||
|
|
||||||
use super::Events;
|
use super::Events;
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
// SPDX-License-Identifier: MPL-2.0
|
// SPDX-License-Identifier: MPL-2.0
|
||||||
|
|
||||||
#![allow(unused_variables)]
|
#![expect(unused_variables)]
|
||||||
|
|
||||||
use core::time::Duration;
|
use core::time::Duration;
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
// SPDX-License-Identifier: MPL-2.0
|
// SPDX-License-Identifier: MPL-2.0
|
||||||
|
|
||||||
#![allow(dead_code)]
|
#![expect(dead_code)]
|
||||||
#![allow(unused_variables)]
|
#![expect(unused_variables)]
|
||||||
|
|
||||||
use super::*;
|
use super::*;
|
||||||
use crate::{
|
use crate::{
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
// SPDX-License-Identifier: MPL-2.0
|
// SPDX-License-Identifier: MPL-2.0
|
||||||
|
|
||||||
#![allow(dead_code)]
|
#![expect(dead_code)]
|
||||||
#![allow(unused_variables)]
|
#![expect(unused_variables)]
|
||||||
|
|
||||||
use super::*;
|
use super::*;
|
||||||
use crate::{
|
use crate::{
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
// SPDX-License-Identifier: MPL-2.0
|
// SPDX-License-Identifier: MPL-2.0
|
||||||
|
|
||||||
#![allow(dead_code)]
|
#![expect(dead_code)]
|
||||||
#![allow(unused_variables)]
|
#![expect(unused_variables)]
|
||||||
|
|
||||||
use core::ops::Range;
|
use core::ops::Range;
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
// SPDX-License-Identifier: MPL-2.0
|
// SPDX-License-Identifier: MPL-2.0
|
||||||
|
|
||||||
#![allow(dead_code)]
|
#![expect(dead_code)]
|
||||||
pub(super) const ROOT_INODE_HASH: usize = 0;
|
pub(super) const ROOT_INODE_HASH: usize = 0;
|
||||||
|
|
||||||
// Other pub(super) constants
|
// Other pub(super) constants
|
||||||
|
@ -55,24 +55,24 @@ impl ExfatDentry {
|
|||||||
|
|
||||||
const EXFAT_UNUSED: u8 = 0x00;
|
const EXFAT_UNUSED: u8 = 0x00;
|
||||||
|
|
||||||
#[allow(dead_code)]
|
#[expect(dead_code)]
|
||||||
const EXFAT_INVAL: u8 = 0x80;
|
const EXFAT_INVAL: u8 = 0x80;
|
||||||
const EXFAT_BITMAP: u8 = 0x81;
|
const EXFAT_BITMAP: u8 = 0x81;
|
||||||
const EXFAT_UPCASE: u8 = 0x82;
|
const EXFAT_UPCASE: u8 = 0x82;
|
||||||
#[allow(dead_code)]
|
#[expect(dead_code)]
|
||||||
const EXFAT_VOLUME: u8 = 0x83;
|
const EXFAT_VOLUME: u8 = 0x83;
|
||||||
const EXFAT_FILE: u8 = 0x85;
|
const EXFAT_FILE: u8 = 0x85;
|
||||||
|
|
||||||
#[allow(dead_code)]
|
#[expect(dead_code)]
|
||||||
const EXFAT_GUID: u8 = 0xA0;
|
const EXFAT_GUID: u8 = 0xA0;
|
||||||
#[allow(dead_code)]
|
#[expect(dead_code)]
|
||||||
const EXFAT_PADDING: u8 = 0xA1;
|
const EXFAT_PADDING: u8 = 0xA1;
|
||||||
#[allow(dead_code)]
|
#[expect(dead_code)]
|
||||||
const EXFAT_ACLTAB: u8 = 0xA2;
|
const EXFAT_ACLTAB: u8 = 0xA2;
|
||||||
|
|
||||||
const EXFAT_STREAM: u8 = 0xC0;
|
const EXFAT_STREAM: u8 = 0xC0;
|
||||||
const EXFAT_NAME: u8 = 0xC1;
|
const EXFAT_NAME: u8 = 0xC1;
|
||||||
#[allow(dead_code)]
|
#[expect(dead_code)]
|
||||||
const EXFAT_ACL: u8 = 0xC2;
|
const EXFAT_ACL: u8 = 0xC2;
|
||||||
|
|
||||||
const EXFAT_VENDOR_EXT: u8 = 0xE0;
|
const EXFAT_VENDOR_EXT: u8 = 0xE0;
|
||||||
@ -204,7 +204,7 @@ impl ExfatDentrySet {
|
|||||||
/// Stream dentry index.
|
/// Stream dentry index.
|
||||||
const ES_IDX_STREAM: usize = 1;
|
const ES_IDX_STREAM: usize = 1;
|
||||||
/// Name dentry index.
|
/// Name dentry index.
|
||||||
#[allow(dead_code)]
|
#[expect(dead_code)]
|
||||||
const ES_IDX_FIRST_FILENAME: usize = 2;
|
const ES_IDX_FIRST_FILENAME: usize = 2;
|
||||||
|
|
||||||
pub(super) fn new(dentries: Vec<ExfatDentry>, should_checksum_match: bool) -> Result<Self> {
|
pub(super) fn new(dentries: Vec<ExfatDentry>, should_checksum_match: bool) -> Result<Self> {
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
// SPDX-License-Identifier: MPL-2.0
|
// SPDX-License-Identifier: MPL-2.0
|
||||||
|
|
||||||
#![allow(dead_code)]
|
#![expect(dead_code)]
|
||||||
#![allow(unused_variables)]
|
#![expect(unused_variables)]
|
||||||
|
|
||||||
use core::{num::NonZeroUsize, ops::Range, sync::atomic::AtomicU64};
|
use core::{num::NonZeroUsize, ops::Range, sync::atomic::AtomicU64};
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
// SPDX-License-Identifier: MPL-2.0
|
// SPDX-License-Identifier: MPL-2.0
|
||||||
|
|
||||||
#![allow(dead_code)]
|
#![expect(dead_code)]
|
||||||
#![allow(unused_variables)]
|
#![expect(unused_variables)]
|
||||||
|
|
||||||
use alloc::string::String;
|
use alloc::string::String;
|
||||||
use core::{cmp::Ordering, time::Duration};
|
use core::{cmp::Ordering, time::Duration};
|
||||||
@ -491,7 +491,7 @@ impl ExfatInodeInner {
|
|||||||
};
|
};
|
||||||
|
|
||||||
// FIXME: This isn't expected by the compiler.
|
// FIXME: This isn't expected by the compiler.
|
||||||
#[allow(non_local_definitions)]
|
#[expect(non_local_definitions)]
|
||||||
impl DirentVisitor for Vec<(String, usize)> {
|
impl DirentVisitor for Vec<(String, usize)> {
|
||||||
fn visit(
|
fn visit(
|
||||||
&mut self,
|
&mut self,
|
||||||
@ -1011,7 +1011,7 @@ impl ExfatInode {
|
|||||||
let sub_dir = inner.num_sub_inodes;
|
let sub_dir = inner.num_sub_inodes;
|
||||||
let mut child_offsets: Vec<usize> = vec![];
|
let mut child_offsets: Vec<usize> = vec![];
|
||||||
// FIXME: This isn't expected by the compiler.
|
// FIXME: This isn't expected by the compiler.
|
||||||
#[allow(non_local_definitions)]
|
#[expect(non_local_definitions)]
|
||||||
impl DirentVisitor for Vec<usize> {
|
impl DirentVisitor for Vec<usize> {
|
||||||
fn visit(
|
fn visit(
|
||||||
&mut self,
|
&mut self,
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
// SPDX-License-Identifier: MPL-2.0
|
// SPDX-License-Identifier: MPL-2.0
|
||||||
|
|
||||||
#![allow(dead_code)]
|
#![expect(dead_code)]
|
||||||
#![allow(unused_variables)]
|
#![expect(unused_variables)]
|
||||||
|
|
||||||
use align_ext::AlignExt;
|
use align_ext::AlignExt;
|
||||||
use aster_rights::Full;
|
use aster_rights::Full;
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
// SPDX-License-Identifier: MPL-2.0
|
// SPDX-License-Identifier: MPL-2.0
|
||||||
|
|
||||||
#![allow(dead_code)]
|
#![expect(dead_code)]
|
||||||
|
|
||||||
use super::{
|
use super::{
|
||||||
block_group::{BlockGroup, RawGroupDescriptor},
|
block_group::{BlockGroup, RawGroupDescriptor},
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
// SPDX-License-Identifier: MPL-2.0
|
// SPDX-License-Identifier: MPL-2.0
|
||||||
|
|
||||||
#![allow(unused_variables)]
|
#![expect(unused_variables)]
|
||||||
|
|
||||||
use core::time::Duration;
|
use core::time::Duration;
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
// SPDX-License-Identifier: MPL-2.0
|
// SPDX-License-Identifier: MPL-2.0
|
||||||
|
|
||||||
#![allow(dead_code)]
|
#![expect(dead_code)]
|
||||||
#![allow(unused_variables)]
|
#![expect(unused_variables)]
|
||||||
|
|
||||||
use alloc::{borrow::ToOwned, rc::Rc};
|
use alloc::{borrow::ToOwned, rc::Rc};
|
||||||
use core::sync::atomic::{AtomicUsize, Ordering};
|
use core::sync::atomic::{AtomicUsize, Ordering};
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
// SPDX-License-Identifier: MPL-2.0
|
// SPDX-License-Identifier: MPL-2.0
|
||||||
|
|
||||||
#![allow(unused_variables)]
|
#![expect(unused_variables)]
|
||||||
|
|
||||||
//! Opened File Handle
|
//! Opened File Handle
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
// SPDX-License-Identifier: MPL-2.0
|
// SPDX-License-Identifier: MPL-2.0
|
||||||
|
|
||||||
#![allow(unused_variables)]
|
#![expect(unused_variables)]
|
||||||
|
|
||||||
use core::sync::atomic::{AtomicU8, Ordering};
|
use core::sync::atomic::{AtomicU8, Ordering};
|
||||||
|
|
||||||
|
@ -195,7 +195,7 @@ impl FsResolver {
|
|||||||
/// If `follow_tail_link` is true and the trailing component is a symlink,
|
/// If `follow_tail_link` is true and the trailing component is a symlink,
|
||||||
/// it will be followed.
|
/// it will be followed.
|
||||||
/// Symlinks in earlier components of the path will always be followed.
|
/// Symlinks in earlier components of the path will always be followed.
|
||||||
#[allow(clippy::redundant_closure)]
|
#[expect(clippy::redundant_closure)]
|
||||||
fn lookup_from_parent(
|
fn lookup_from_parent(
|
||||||
&self,
|
&self,
|
||||||
parent: &Dentry,
|
parent: &Dentry,
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
// SPDX-License-Identifier: MPL-2.0
|
// SPDX-License-Identifier: MPL-2.0
|
||||||
|
|
||||||
#![allow(unused_variables)]
|
#![expect(unused_variables)]
|
||||||
|
|
||||||
//! Opened Inode-backed File Handle
|
//! Opened Inode-backed File Handle
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
// SPDX-License-Identifier: MPL-2.0
|
// SPDX-License-Identifier: MPL-2.0
|
||||||
|
|
||||||
#![allow(dead_code)]
|
#![expect(dead_code)]
|
||||||
#![allow(unused_variables)]
|
#![expect(unused_variables)]
|
||||||
|
|
||||||
use core::{
|
use core::{
|
||||||
sync::atomic::{AtomicU32, Ordering},
|
sync::atomic::{AtomicU32, Ordering},
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
// SPDX-License-Identifier: MPL-2.0
|
// SPDX-License-Identifier: MPL-2.0
|
||||||
|
|
||||||
#![allow(dead_code)]
|
#![expect(dead_code)]
|
||||||
|
|
||||||
use super::{
|
use super::{
|
||||||
dir::{DirOps, ProcDir},
|
dir::{DirOps, ProcDir},
|
||||||
@ -166,7 +166,7 @@ impl OptionalBuilder {
|
|||||||
self
|
self
|
||||||
}
|
}
|
||||||
|
|
||||||
#[allow(clippy::type_complexity)]
|
#[expect(clippy::type_complexity)]
|
||||||
pub fn build(
|
pub fn build(
|
||||||
self,
|
self,
|
||||||
) -> Result<(
|
) -> Result<(
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
// SPDX-License-Identifier: MPL-2.0
|
// SPDX-License-Identifier: MPL-2.0
|
||||||
|
|
||||||
#![allow(unused_variables)]
|
#![expect(unused_variables)]
|
||||||
|
|
||||||
use core::time::Duration;
|
use core::time::Duration;
|
||||||
|
|
||||||
|
@ -4,7 +4,7 @@ use aster_rights::Rights;
|
|||||||
|
|
||||||
use crate::prelude::*;
|
use crate::prelude::*;
|
||||||
|
|
||||||
#[allow(non_camel_case_types)]
|
#[expect(non_camel_case_types)]
|
||||||
#[derive(Clone, Copy, Debug)]
|
#[derive(Clone, Copy, Debug)]
|
||||||
#[repr(u8)]
|
#[repr(u8)]
|
||||||
pub enum AccessMode {
|
pub enum AccessMode {
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
// SPDX-License-Identifier: MPL-2.0
|
// SPDX-License-Identifier: MPL-2.0
|
||||||
|
|
||||||
#![allow(unused_variables)]
|
#![expect(unused_variables)]
|
||||||
|
|
||||||
use super::InodeType;
|
use super::InodeType;
|
||||||
use crate::prelude::*;
|
use crate::prelude::*;
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
// SPDX-License-Identifier: MPL-2.0
|
// SPDX-License-Identifier: MPL-2.0
|
||||||
|
|
||||||
#![allow(unused_variables)]
|
#![expect(unused_variables)]
|
||||||
|
|
||||||
use core::{any::TypeId, time::Duration};
|
use core::{any::TypeId, time::Duration};
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
// SPDX-License-Identifier: MPL-2.0
|
// SPDX-License-Identifier: MPL-2.0
|
||||||
|
|
||||||
#![allow(dead_code)]
|
#![expect(dead_code)]
|
||||||
|
|
||||||
use core::{
|
use core::{
|
||||||
iter,
|
iter,
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
// SPDX-License-Identifier: MPL-2.0
|
// SPDX-License-Identifier: MPL-2.0
|
||||||
|
|
||||||
#![allow(unused_variables)]
|
#![expect(unused_variables)]
|
||||||
|
|
||||||
use alloc::sync::Arc;
|
use alloc::sync::Arc;
|
||||||
|
|
||||||
|
@ -7,7 +7,7 @@ use crate::{
|
|||||||
|
|
||||||
pub mod semaphore;
|
pub mod semaphore;
|
||||||
|
|
||||||
#[allow(non_camel_case_types)]
|
#[expect(non_camel_case_types)]
|
||||||
pub type key_t = i32;
|
pub type key_t = i32;
|
||||||
|
|
||||||
bitflags! {
|
bitflags! {
|
||||||
@ -25,7 +25,7 @@ bitflags! {
|
|||||||
|
|
||||||
#[repr(i32)]
|
#[repr(i32)]
|
||||||
#[derive(Debug, Clone, Copy, TryFromInt)]
|
#[derive(Debug, Clone, Copy, TryFromInt)]
|
||||||
#[allow(non_camel_case_types)]
|
#[expect(non_camel_case_types)]
|
||||||
pub enum IpcControlCmd {
|
pub enum IpcControlCmd {
|
||||||
IPC_RMID = 0,
|
IPC_RMID = 0,
|
||||||
IPC_SET = 1,
|
IPC_SET = 1,
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
// SPDX-License-Identifier: MPL-2.0
|
// SPDX-License-Identifier: MPL-2.0
|
||||||
|
|
||||||
#![allow(unused_variables)]
|
#![expect(unused_variables)]
|
||||||
|
|
||||||
//! The module to parse kernel command-line arguments.
|
//! The module to parse kernel command-line arguments.
|
||||||
//!
|
//!
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
#![no_std]
|
#![no_std]
|
||||||
#![no_main]
|
#![no_main]
|
||||||
#![deny(unsafe_code)]
|
#![deny(unsafe_code)]
|
||||||
#![allow(incomplete_features)]
|
#![expect(incomplete_features)]
|
||||||
#![feature(btree_cursors)]
|
#![feature(btree_cursors)]
|
||||||
#![feature(btree_extract_if)]
|
#![feature(btree_extract_if)]
|
||||||
#![feature(debug_closure_helpers)]
|
#![feature(debug_closure_helpers)]
|
||||||
|
@ -6,7 +6,7 @@ use crate::prelude::*;
|
|||||||
/// From <https://elixir.bootlin.com/linux/v6.0.9/source/include/linux/net.h>
|
/// From <https://elixir.bootlin.com/linux/v6.0.9/source/include/linux/net.h>
|
||||||
#[repr(i32)]
|
#[repr(i32)]
|
||||||
#[derive(Debug, Clone, Copy, PartialEq, Eq, TryFromInt)]
|
#[derive(Debug, Clone, Copy, PartialEq, Eq, TryFromInt)]
|
||||||
#[allow(non_camel_case_types)]
|
#[expect(non_camel_case_types)]
|
||||||
pub enum SockShutdownCmd {
|
pub enum SockShutdownCmd {
|
||||||
/// Shutdown receptions
|
/// Shutdown receptions
|
||||||
SHUT_RD = 0,
|
SHUT_RD = 0,
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
// SPDX-License-Identifier: MPL-2.0
|
// SPDX-License-Identifier: MPL-2.0
|
||||||
|
|
||||||
#![allow(unused)]
|
#![expect(unused)]
|
||||||
|
|
||||||
pub(crate) use alloc::{
|
pub(crate) use alloc::{
|
||||||
boxed::Box,
|
boxed::Box,
|
||||||
|
@ -5,7 +5,7 @@ pub mod credentials;
|
|||||||
mod exit;
|
mod exit;
|
||||||
mod kill;
|
mod kill;
|
||||||
pub mod posix_thread;
|
pub mod posix_thread;
|
||||||
#[allow(clippy::module_inception)]
|
#[expect(clippy::module_inception)]
|
||||||
mod process;
|
mod process;
|
||||||
mod process_filter;
|
mod process_filter;
|
||||||
pub mod process_table;
|
pub mod process_table;
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
// SPDX-License-Identifier: MPL-2.0
|
// SPDX-License-Identifier: MPL-2.0
|
||||||
|
|
||||||
#![allow(dead_code)]
|
#![expect(dead_code)]
|
||||||
|
|
||||||
use ostd::{cpu::CpuSet, sync::RwArc, task::Task, user::UserSpace};
|
use ostd::{cpu::CpuSet, sync::RwArc, task::Task, user::UserSpace};
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
// SPDX-License-Identifier: MPL-2.0
|
// SPDX-License-Identifier: MPL-2.0
|
||||||
|
|
||||||
#![allow(dead_code)]
|
#![expect(dead_code)]
|
||||||
|
|
||||||
use intrusive_collections::{intrusive_adapter, LinkedList, LinkedListAtomicLink};
|
use intrusive_collections::{intrusive_adapter, LinkedList, LinkedListAtomicLink};
|
||||||
use ostd::{
|
use ostd::{
|
||||||
@ -382,7 +382,7 @@ impl FutexKey {
|
|||||||
// The implementation is from occlum
|
// The implementation is from occlum
|
||||||
|
|
||||||
#[derive(PartialEq, Debug, Clone, Copy)]
|
#[derive(PartialEq, Debug, Clone, Copy)]
|
||||||
#[allow(non_camel_case_types)]
|
#[expect(non_camel_case_types)]
|
||||||
pub enum FutexOp {
|
pub enum FutexOp {
|
||||||
FUTEX_WAIT = 0,
|
FUTEX_WAIT = 0,
|
||||||
FUTEX_WAKE = 1,
|
FUTEX_WAKE = 1,
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
// SPDX-License-Identifier: MPL-2.0
|
// SPDX-License-Identifier: MPL-2.0
|
||||||
|
|
||||||
#![allow(dead_code)]
|
#![expect(dead_code)]
|
||||||
|
|
||||||
use super::{Pid, Process};
|
use super::{Pid, Process};
|
||||||
use crate::{
|
use crate::{
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
// SPDX-License-Identifier: MPL-2.0
|
// SPDX-License-Identifier: MPL-2.0
|
||||||
|
|
||||||
#![allow(unused_variables)]
|
#![expect(unused_variables)]
|
||||||
|
|
||||||
use ostd::sync::WaitQueue;
|
use ostd::sync::WaitQueue;
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
// SPDX-License-Identifier: MPL-2.0
|
// SPDX-License-Identifier: MPL-2.0
|
||||||
|
|
||||||
#![allow(dead_code)]
|
#![expect(dead_code)]
|
||||||
|
|
||||||
use super::{Pgid, Pid};
|
use super::{Pgid, Pid};
|
||||||
use crate::prelude::*;
|
use crate::prelude::*;
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
// SPDX-License-Identifier: MPL-2.0
|
// SPDX-License-Identifier: MPL-2.0
|
||||||
|
|
||||||
#![allow(dead_code)]
|
#![expect(dead_code)]
|
||||||
|
|
||||||
//! A global table stores the pid to process mapping.
|
//! A global table stores the pid to process mapping.
|
||||||
//! This table can be used to get process with pid.
|
//! This table can be used to get process with pid.
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
// SPDX-License-Identifier: MPL-2.0
|
// SPDX-License-Identifier: MPL-2.0
|
||||||
|
|
||||||
#![allow(dead_code)]
|
#![expect(dead_code)]
|
||||||
|
|
||||||
use crate::prelude::*;
|
use crate::prelude::*;
|
||||||
|
|
||||||
@ -14,7 +14,7 @@ use crate::prelude::*;
|
|||||||
/// > about the environment in which it is operating. The form of this information
|
/// > about the environment in which it is operating. The form of this information
|
||||||
/// > is a table of key-value pairs, where the keys are from the set of ‘AT_’
|
/// > is a table of key-value pairs, where the keys are from the set of ‘AT_’
|
||||||
/// > values in elf.h.
|
/// > values in elf.h.
|
||||||
#[allow(non_camel_case_types)]
|
#[expect(non_camel_case_types)]
|
||||||
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
|
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
|
||||||
#[repr(u8)]
|
#[repr(u8)]
|
||||||
pub enum AuxKey {
|
pub enum AuxKey {
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
// SPDX-License-Identifier: MPL-2.0
|
// SPDX-License-Identifier: MPL-2.0
|
||||||
|
|
||||||
#![allow(dead_code)]
|
#![expect(dead_code)]
|
||||||
|
|
||||||
//! The init stack for the process.
|
//! The init stack for the process.
|
||||||
//! The init stack is used to store the `argv` and `envp` and auxiliary vectors.
|
//! The init stack is used to store the `argv` and `envp` and auxiliary vectors.
|
||||||
|
@ -165,23 +165,23 @@ impl ElfHeader {
|
|||||||
pub struct HeaderPt2_64 {
|
pub struct HeaderPt2_64 {
|
||||||
pub type_: Type_,
|
pub type_: Type_,
|
||||||
pub machine: Machine_,
|
pub machine: Machine_,
|
||||||
#[allow(dead_code)]
|
#[expect(dead_code)]
|
||||||
pub version: u32,
|
pub version: u32,
|
||||||
pub entry_point: u64,
|
pub entry_point: u64,
|
||||||
pub ph_offset: u64,
|
pub ph_offset: u64,
|
||||||
#[allow(dead_code)]
|
#[expect(dead_code)]
|
||||||
pub sh_offset: u64,
|
pub sh_offset: u64,
|
||||||
#[allow(dead_code)]
|
#[expect(dead_code)]
|
||||||
pub flags: u32,
|
pub flags: u32,
|
||||||
#[allow(dead_code)]
|
#[expect(dead_code)]
|
||||||
pub header_size: u16,
|
pub header_size: u16,
|
||||||
pub ph_entry_size: u16,
|
pub ph_entry_size: u16,
|
||||||
pub ph_count: u16,
|
pub ph_count: u16,
|
||||||
#[allow(dead_code)]
|
#[expect(dead_code)]
|
||||||
pub sh_entry_size: u16,
|
pub sh_entry_size: u16,
|
||||||
#[allow(dead_code)]
|
#[expect(dead_code)]
|
||||||
pub sh_count: u16,
|
pub sh_count: u16,
|
||||||
#[allow(dead_code)]
|
#[expect(dead_code)]
|
||||||
pub sh_str_index: u16,
|
pub sh_str_index: u16,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
// SPDX-License-Identifier: MPL-2.0
|
// SPDX-License-Identifier: MPL-2.0
|
||||||
|
|
||||||
#![allow(dead_code)]
|
#![expect(dead_code)]
|
||||||
|
|
||||||
//! This module is used to parse elf file content to get elf_load_info.
|
//! This module is used to parse elf file content to get elf_load_info.
|
||||||
//! When create a process from elf file, we will use the elf_load_info to construct the VmSpace
|
//! When create a process from elf file, we will use the elf_load_info to construct the VmSpace
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
// SPDX-License-Identifier: MPL-2.0
|
// SPDX-License-Identifier: MPL-2.0
|
||||||
// FIXME: The resource limits should be respected by the corresponding subsystems of the kernel.
|
// FIXME: The resource limits should be respected by the corresponding subsystems of the kernel.
|
||||||
|
|
||||||
#![allow(non_camel_case_types)]
|
#![expect(non_camel_case_types)]
|
||||||
|
|
||||||
use super::process_vm::{INIT_STACK_SIZE, USER_HEAP_SIZE_LIMIT};
|
use super::process_vm::{INIT_STACK_SIZE, USER_HEAP_SIZE_LIMIT};
|
||||||
use crate::prelude::*;
|
use crate::prelude::*;
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
// SPDX-License-Identifier: MPL-2.0
|
// SPDX-License-Identifier: MPL-2.0
|
||||||
|
|
||||||
#![allow(dead_code)]
|
#![expect(dead_code)]
|
||||||
#![allow(non_camel_case_types)]
|
#![expect(non_camel_case_types)]
|
||||||
|
|
||||||
use core::mem::{self, size_of};
|
use core::mem::{self, size_of};
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
// SPDX-License-Identifier: MPL-2.0
|
// SPDX-License-Identifier: MPL-2.0
|
||||||
|
|
||||||
#![allow(dead_code)]
|
#![expect(dead_code)]
|
||||||
|
|
||||||
/// Standard signals
|
/// Standard signals
|
||||||
pub(super) const MIN_STD_SIG_NUM: u8 = 1;
|
pub(super) const MIN_STD_SIG_NUM: u8 = 1;
|
||||||
|
@ -135,7 +135,7 @@ pub fn handle_pending_signal(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[allow(clippy::too_many_arguments)]
|
#[expect(clippy::too_many_arguments)]
|
||||||
pub fn handle_user_signal(
|
pub fn handle_user_signal(
|
||||||
ctx: &Context,
|
ctx: &Context,
|
||||||
sig_num: SigNum,
|
sig_num: SigNum,
|
||||||
|
@ -84,7 +84,7 @@ impl<T: Into<SigSet>> ops::BitOrAssign<T> for SigSet {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[allow(clippy::suspicious_arithmetic_impl)]
|
#[expect(clippy::suspicious_arithmetic_impl)]
|
||||||
impl<T: Into<SigSet>> ops::Add<T> for SigSet {
|
impl<T: Into<SigSet>> ops::Add<T> for SigSet {
|
||||||
type Output = Self;
|
type Output = Self;
|
||||||
|
|
||||||
@ -95,7 +95,7 @@ impl<T: Into<SigSet>> ops::Add<T> for SigSet {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[allow(clippy::suspicious_op_assign_impl)]
|
#[expect(clippy::suspicious_op_assign_impl)]
|
||||||
impl<T: Into<SigSet>> ops::AddAssign<T> for SigSet {
|
impl<T: Into<SigSet>> ops::AddAssign<T> for SigSet {
|
||||||
fn add_assign(&mut self, rhs: T) {
|
fn add_assign(&mut self, rhs: T) {
|
||||||
self.bits |= rhs.into().bits;
|
self.bits |= rhs.into().bits;
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
// SPDX-License-Identifier: MPL-2.0
|
// SPDX-License-Identifier: MPL-2.0
|
||||||
|
|
||||||
#![allow(dead_code)]
|
#![expect(dead_code)]
|
||||||
|
|
||||||
use core::sync::atomic::{AtomicU8, Ordering};
|
use core::sync::atomic::{AtomicU8, Ordering};
|
||||||
|
|
||||||
|
@ -25,7 +25,7 @@ bitflags! {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#[repr(u8)]
|
#[repr(u8)]
|
||||||
#[allow(non_camel_case_types)]
|
#[expect(non_camel_case_types)]
|
||||||
#[derive(Debug, Clone, Copy, Default, PartialEq, Eq)]
|
#[derive(Debug, Clone, Copy, Default, PartialEq, Eq)]
|
||||||
pub enum SigStackStatus {
|
pub enum SigStackStatus {
|
||||||
#[default]
|
#[default]
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
// SPDX-License-Identifier: MPL-2.0
|
// SPDX-License-Identifier: MPL-2.0
|
||||||
|
|
||||||
#![allow(dead_code)]
|
#![expect(dead_code)]
|
||||||
|
|
||||||
use super::Signal;
|
use super::Signal;
|
||||||
use crate::process::{
|
use crate::process::{
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
// SPDX-License-Identifier: MPL-2.0
|
// SPDX-License-Identifier: MPL-2.0
|
||||||
|
|
||||||
#![allow(dead_code)]
|
#![expect(dead_code)]
|
||||||
#![allow(unused_variables)]
|
#![expect(unused_variables)]
|
||||||
|
|
||||||
use alloc::sync::Arc;
|
use alloc::sync::Arc;
|
||||||
use core::time::Duration;
|
use core::time::Duration;
|
||||||
|
@ -2,5 +2,5 @@
|
|||||||
|
|
||||||
mod condvar;
|
mod condvar;
|
||||||
|
|
||||||
#[allow(unused_imports)]
|
#[expect(unused_imports)]
|
||||||
pub use self::condvar::{Condvar, LockErr};
|
pub use self::condvar::{Condvar, LockErr};
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
// SPDX-License-Identifier: MPL-2.0
|
// SPDX-License-Identifier: MPL-2.0
|
||||||
|
|
||||||
#![allow(dead_code)]
|
#![expect(dead_code)]
|
||||||
|
|
||||||
use super::{process_filter::ProcessFilter, signal::constants::SIGCHLD, ExitCode, Pid, Process};
|
use super::{process_filter::ProcessFilter, signal::constants::SIGCHLD, ExitCode, Pid, Process};
|
||||||
use crate::{
|
use crate::{
|
||||||
|
@ -165,7 +165,7 @@ impl Ord for FairQueueItem {
|
|||||||
/// ensure the efficiency for finding next-to-run threads.
|
/// ensure the efficiency for finding next-to-run threads.
|
||||||
#[derive(Debug)]
|
#[derive(Debug)]
|
||||||
pub(super) struct FairClassRq {
|
pub(super) struct FairClassRq {
|
||||||
#[allow(unused)]
|
#[expect(unused)]
|
||||||
cpu: CpuId,
|
cpu: CpuId,
|
||||||
/// The ready-to-run threads.
|
/// The ready-to-run threads.
|
||||||
entities: BinaryHeap<Reverse<FairQueueItem>>,
|
entities: BinaryHeap<Reverse<FairQueueItem>>,
|
||||||
|
@ -38,7 +38,7 @@ use crate::thread::{AsThread, Thread};
|
|||||||
|
|
||||||
type SchedEntity = (Arc<Task>, Arc<Thread>);
|
type SchedEntity = (Arc<Task>, Arc<Thread>);
|
||||||
|
|
||||||
#[allow(unused)]
|
#[expect(unused)]
|
||||||
pub fn init() {
|
pub fn init() {
|
||||||
inject_scheduler(Box::leak(Box::new(ClassScheduler::new())));
|
inject_scheduler(Box::leak(Box::new(ClassScheduler::new())));
|
||||||
}
|
}
|
||||||
|
@ -135,7 +135,7 @@ impl PrioArray {
|
|||||||
/// is empty, the 2 arrays are swapped by `index`.
|
/// is empty, the 2 arrays are swapped by `index`.
|
||||||
#[derive(Debug)]
|
#[derive(Debug)]
|
||||||
pub(super) struct RealTimeClassRq {
|
pub(super) struct RealTimeClassRq {
|
||||||
#[allow(unused)]
|
#[expect(unused)]
|
||||||
cpu: CpuId,
|
cpu: CpuId,
|
||||||
index: bool,
|
index: bool,
|
||||||
array: [PrioArray; 2],
|
array: [PrioArray; 2],
|
||||||
|
@ -5,7 +5,7 @@ use ostd::cpu::UserContext;
|
|||||||
use super::SyscallReturn;
|
use super::SyscallReturn;
|
||||||
use crate::prelude::*;
|
use crate::prelude::*;
|
||||||
|
|
||||||
#[allow(non_camel_case_types)]
|
#[expect(non_camel_case_types)]
|
||||||
#[repr(u64)]
|
#[repr(u64)]
|
||||||
#[derive(Debug, TryFromInt)]
|
#[derive(Debug, TryFromInt)]
|
||||||
pub enum ArchPrctlCode {
|
pub enum ArchPrctlCode {
|
||||||
|
@ -39,7 +39,7 @@ pub fn sys_clock_gettime(
|
|||||||
// The hard-coded clock IDs.
|
// The hard-coded clock IDs.
|
||||||
#[derive(Debug, Copy, Clone, TryFromInt, PartialEq)]
|
#[derive(Debug, Copy, Clone, TryFromInt, PartialEq)]
|
||||||
#[repr(i32)]
|
#[repr(i32)]
|
||||||
#[allow(non_camel_case_types)]
|
#[expect(non_camel_case_types)]
|
||||||
pub enum ClockId {
|
pub enum ClockId {
|
||||||
CLOCK_REALTIME = 0,
|
CLOCK_REALTIME = 0,
|
||||||
CLOCK_MONOTONIC = 1,
|
CLOCK_MONOTONIC = 1,
|
||||||
@ -68,7 +68,7 @@ pub enum ClockId {
|
|||||||
pub enum DynamicClockIdInfo {
|
pub enum DynamicClockIdInfo {
|
||||||
Pid(u32, DynamicClockType),
|
Pid(u32, DynamicClockType),
|
||||||
Tid(u32, DynamicClockType),
|
Tid(u32, DynamicClockType),
|
||||||
#[allow(dead_code)]
|
#[expect(dead_code)]
|
||||||
Fd(u32),
|
Fd(u32),
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -161,7 +161,7 @@ fn handle_setown(fd: FileDesc, arg: u64, ctx: &Context) -> Result<SyscallReturn>
|
|||||||
|
|
||||||
#[repr(i32)]
|
#[repr(i32)]
|
||||||
#[derive(Debug, Clone, Copy, TryFromInt)]
|
#[derive(Debug, Clone, Copy, TryFromInt)]
|
||||||
#[allow(non_camel_case_types)]
|
#[expect(non_camel_case_types)]
|
||||||
enum FcntlCmd {
|
enum FcntlCmd {
|
||||||
F_DUPFD = 0,
|
F_DUPFD = 0,
|
||||||
F_GETFD = 1,
|
F_GETFD = 1,
|
||||||
@ -176,10 +176,10 @@ enum FcntlCmd {
|
|||||||
F_DUPFD_CLOEXEC = 1030,
|
F_DUPFD_CLOEXEC = 1030,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[allow(non_camel_case_types)]
|
#[expect(non_camel_case_types)]
|
||||||
pub type off_t = i64;
|
pub type off_t = i64;
|
||||||
|
|
||||||
#[allow(non_camel_case_types)]
|
#[expect(non_camel_case_types)]
|
||||||
#[derive(Debug, Copy, Clone, TryFromInt)]
|
#[derive(Debug, Copy, Clone, TryFromInt)]
|
||||||
#[repr(u16)]
|
#[repr(u16)]
|
||||||
pub enum RangeLockWhence {
|
pub enum RangeLockWhence {
|
||||||
|
@ -229,11 +229,11 @@ impl DirentSerializer for Dirent64 {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[allow(non_camel_case_types)]
|
#[expect(non_camel_case_types)]
|
||||||
#[repr(u8)]
|
#[repr(u8)]
|
||||||
#[derive(Debug, Clone, Copy)]
|
#[derive(Debug, Clone, Copy)]
|
||||||
enum DirentType {
|
enum DirentType {
|
||||||
#[allow(dead_code)]
|
#[expect(dead_code)]
|
||||||
DT_UNKNOWN = 0,
|
DT_UNKNOWN = 0,
|
||||||
DT_FIFO = 1,
|
DT_FIFO = 1,
|
||||||
DT_CHR = 2,
|
DT_CHR = 2,
|
||||||
@ -242,7 +242,7 @@ enum DirentType {
|
|||||||
DT_REG = 8,
|
DT_REG = 8,
|
||||||
DT_LNK = 10,
|
DT_LNK = 10,
|
||||||
DT_SOCK = 12,
|
DT_SOCK = 12,
|
||||||
#[allow(dead_code)]
|
#[expect(dead_code)]
|
||||||
DT_WHT = 14,
|
DT_WHT = 14,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -60,7 +60,7 @@ fn madv_free(start: Vaddr, end: Vaddr, ctx: &Context) -> Result<()> {
|
|||||||
|
|
||||||
#[repr(i32)]
|
#[repr(i32)]
|
||||||
#[derive(Debug, Clone, Copy, TryFromInt)]
|
#[derive(Debug, Clone, Copy, TryFromInt)]
|
||||||
#[allow(non_camel_case_types)]
|
#[expect(non_camel_case_types)]
|
||||||
/// This definition is the same from linux
|
/// This definition is the same from linux
|
||||||
pub enum MadviseBehavior {
|
pub enum MadviseBehavior {
|
||||||
MADV_NORMAL = 0, /* no further special treatment */
|
MADV_NORMAL = 0, /* no further special treatment */
|
||||||
|
@ -96,7 +96,7 @@ const PR_GET_NAME: i32 = 16;
|
|||||||
const PR_SET_TIMERSLACK: i32 = 29;
|
const PR_SET_TIMERSLACK: i32 = 29;
|
||||||
const PR_GET_TIMERSLACK: i32 = 30;
|
const PR_GET_TIMERSLACK: i32 = 30;
|
||||||
|
|
||||||
#[allow(non_camel_case_types)]
|
#[expect(non_camel_case_types)]
|
||||||
#[derive(Debug, Clone, Copy)]
|
#[derive(Debug, Clone, Copy)]
|
||||||
pub enum PrctlCmd {
|
pub enum PrctlCmd {
|
||||||
PR_SET_PDEATHSIG(SigNum),
|
PR_SET_PDEATHSIG(SigNum),
|
||||||
@ -105,9 +105,9 @@ pub enum PrctlCmd {
|
|||||||
PR_GET_NAME(Vaddr),
|
PR_GET_NAME(Vaddr),
|
||||||
PR_GET_KEEPCAPS,
|
PR_GET_KEEPCAPS,
|
||||||
PR_SET_KEEPCAPS(u32),
|
PR_SET_KEEPCAPS(u32),
|
||||||
#[allow(dead_code)]
|
#[expect(dead_code)]
|
||||||
PR_SET_TIMERSLACK(u64),
|
PR_SET_TIMERSLACK(u64),
|
||||||
#[allow(dead_code)]
|
#[expect(dead_code)]
|
||||||
PR_GET_TIMERSLACK,
|
PR_GET_TIMERSLACK,
|
||||||
PR_SET_DUMPABLE(Dumpable),
|
PR_SET_DUMPABLE(Dumpable),
|
||||||
PR_GET_DUMPABLE,
|
PR_GET_DUMPABLE,
|
||||||
|
@ -219,7 +219,7 @@ impl FdSet {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// Equivalent to FD_CLR.
|
/// Equivalent to FD_CLR.
|
||||||
#[allow(unused)]
|
#[expect(unused)]
|
||||||
pub fn unset(&mut self, fd: FileDesc) -> Result<()> {
|
pub fn unset(&mut self, fd: FileDesc) -> Result<()> {
|
||||||
let fd = fd as usize;
|
let fd = fd as usize;
|
||||||
if fd >= FD_SETSIZE {
|
if fd >= FD_SETSIZE {
|
||||||
|
@ -126,7 +126,7 @@ impl PriorityTarget {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[allow(non_camel_case_types)]
|
#[expect(non_camel_case_types)]
|
||||||
#[derive(Clone, Debug, TryFromInt)]
|
#[derive(Clone, Debug, TryFromInt)]
|
||||||
#[repr(i32)]
|
#[repr(i32)]
|
||||||
enum Which {
|
enum Which {
|
||||||
|
@ -11,7 +11,7 @@ use crate::{
|
|||||||
/// `ItimerType` is used to differ the target timer for some timer-related syscalls.
|
/// `ItimerType` is used to differ the target timer for some timer-related syscalls.
|
||||||
#[derive(Debug, Copy, Clone, TryFromInt, PartialEq)]
|
#[derive(Debug, Copy, Clone, TryFromInt, PartialEq)]
|
||||||
#[repr(i32)]
|
#[repr(i32)]
|
||||||
#[allow(non_camel_case_types)]
|
#[expect(non_camel_case_types)]
|
||||||
pub(super) enum ItimerType {
|
pub(super) enum ItimerType {
|
||||||
ITIMER_REAL = 0,
|
ITIMER_REAL = 0,
|
||||||
ITIMER_VIRTUAL = 1,
|
ITIMER_VIRTUAL = 1,
|
||||||
|
@ -126,6 +126,6 @@ impl From<SigStack> for stack_t {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[allow(unused)]
|
#[expect(unused)]
|
||||||
const SIGSTKSZ: usize = 8192;
|
const SIGSTKSZ: usize = 8192;
|
||||||
const MINSTKSZ: usize = 2048;
|
const MINSTKSZ: usize = 2048;
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
// SPDX-License-Identifier: MPL-2.0
|
// SPDX-License-Identifier: MPL-2.0
|
||||||
|
|
||||||
#![allow(unused_variables)]
|
#![expect(unused_variables)]
|
||||||
|
|
||||||
use aster_rights::Full;
|
use aster_rights::Full;
|
||||||
use ostd::{cpu::*, mm::VmSpace};
|
use ostd::{cpu::*, mm::VmSpace};
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
// SPDX-License-Identifier: MPL-2.0
|
// SPDX-License-Identifier: MPL-2.0
|
||||||
|
|
||||||
#![allow(dead_code)]
|
#![expect(dead_code)]
|
||||||
|
|
||||||
//! Work queue mechanism.
|
//! Work queue mechanism.
|
||||||
//!
|
//!
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
// SPDX-License-Identifier: MPL-2.0
|
// SPDX-License-Identifier: MPL-2.0
|
||||||
|
|
||||||
#![allow(dead_code)]
|
#![expect(dead_code)]
|
||||||
|
|
||||||
use core::sync::atomic::{AtomicBool, Ordering};
|
use core::sync::atomic::{AtomicBool, Ordering};
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
// SPDX-License-Identifier: MPL-2.0
|
// SPDX-License-Identifier: MPL-2.0
|
||||||
|
|
||||||
#![allow(dead_code)]
|
#![expect(dead_code)]
|
||||||
|
|
||||||
use ostd::{
|
use ostd::{
|
||||||
cpu::{CpuId, CpuSet},
|
cpu::{CpuId, CpuSet},
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
// SPDX-License-Identifier: MPL-2.0
|
// SPDX-License-Identifier: MPL-2.0
|
||||||
|
|
||||||
#![allow(dead_code)]
|
#![expect(dead_code)]
|
||||||
|
|
||||||
use core::{
|
use core::{
|
||||||
sync::atomic::{AtomicBool, Ordering},
|
sync::atomic::{AtomicBool, Ordering},
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
// SPDX-License-Identifier: MPL-2.0
|
// SPDX-License-Identifier: MPL-2.0
|
||||||
|
|
||||||
#![allow(non_camel_case_types)]
|
#![expect(non_camel_case_types)]
|
||||||
|
|
||||||
pub use core::{timer, Clock};
|
pub use core::{timer, Clock};
|
||||||
|
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user