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

Making signal API real-time signal aware #2451

Open
wants to merge 16 commits into
base: master
Choose a base branch
from
Open
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
4 changes: 4 additions & 0 deletions changelog/2451.changed.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
This pull request adds a new enum **SignalValue** that allows specifying both standard signals and real-time signals. For most functions, a new "real-time signal aware" version was added (for instance, for **sigaction()**, the new function is called **rt_sigaction()**). However, there are two significant changes:

* Turning **SigSet** into iterator now returns real-time signal aware **SignalSetIter** instead of the old **SigSetIter**
* The **signal** field of the **SigevSignal** and **SigevThreadId** structs is now of real-time signal aware type **SignalValue** instead of the old **Signal** type
2 changes: 1 addition & 1 deletion src/sys/aio.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1173,7 +1173,7 @@ pub fn aio_suspend(
/// 0, // priority
/// SigevNotify::SigevNone
/// ));
/// let sev = SigevNotify::SigevSignal { signal: Signal::SIGUSR2, si_value: 0 };
/// let sev = SigevNotify::SigevSignal { signal: SignalValue::Standard(Signal::SIGUSR2), si_value: 0 };
/// lio_listio(LioMode::LIO_NOWAIT, &mut[aiow.as_mut()], sev).unwrap();
/// while !SIGNALED.load(Ordering::Relaxed) {
/// thread::sleep(time::Duration::from_millis(10));
Expand Down
Loading