Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update signal_handler, removing bitflags #967

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 4 additions & 10 deletions kernel/signal_handler/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,13 @@ authors = ["Kevin Boos <[email protected]>"]
name = "signal_handler"
description = "Support for registering POSIX-style signal handlers or trap handlers"
version = "0.1.0"
edition = "2018"
edition = "2021"

[dependencies]
x86_64 = "0.14.8"
log = "0.4.8"
bitflags = "1.3"
spin = "0.9.4"

[dependencies.memory]
path = "../memory"

[dependencies.task]
path = "../task"

[dependencies.thread_local_macro]
path = "../thread_local_macro"
memory = { path = "../memory" }
task = { path = "../task" }
thread_local_macro = { path = "../thread_local_macro" }
7 changes: 2 additions & 5 deletions kernel/signal_handler/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
//! [context]: SignalContext

#![no_std]
#![feature(trait_alias)]
#![feature(trait_alias, variant_count)]

extern crate alloc;

Expand Down Expand Up @@ -99,11 +99,8 @@ pub enum Signal {
/// Bad arithmetic operation, e.g., divide by zero.
/// Analogous to SIGFPE.
ArithmeticError = 3,
//
// Note: if other signals are added, update `NUM_SIGNALS` below.
//
}
const NUM_SIGNALS: usize = 4;
const NUM_SIGNALS: usize = core::mem::variant_count::<Signal>();


/// Information that is passed to a registered [`SignalHandler`]
Expand Down