| Crates.io | tg-signal-impl |
| lib.rs | tg-signal-impl |
| version | 0.1.0-preview.1 |
| created_at | 2026-01-22 13:12:13.490179+00 |
| updated_at | 2026-01-22 13:12:13.490179+00 |
| description | Signal implementation for rCore tutorial OS. |
| homepage | https://github.com/rcore-os/rCore-Tutorial-in-single-workspace |
| repository | https://github.com/rcore-os/rCore-Tutorial-in-single-workspace |
| max_upload_size | |
| id | 2061511 |
| size | 14,530 |
A concrete signal handling implementation for the rCore tutorial operating system.
This crate provides SignalImpl, a complete implementation of the Signal trait from tg-signal. It handles signal queuing, masking, delivery, and user-space signal handler invocation.
use tg_signal_impl::SignalImpl;
use tg_signal::Signal;
// Create a new signal handler
let mut signals = SignalImpl::new();
// Add a signal
signals.add_signal(SignalNo::SIGINT);
// Handle pending signals
let result = signals.handle_signals(&mut context);
SignalImpl - Main signal management structureSignalSet - Bitmap-based signal set for efficient signal trackingHandlingSignal - Enum tracking current signal handling state (Frozen or UserSignal)DefaultAction - Default signal actions (terminate, ignore, stop, continue)add_signal()handle_signals() checks for pending unmasked signalssig_return() restores the original context after handler completesLicensed under either of MIT license or Apache License, Version 2.0 at your option.