Skip to content

Commit aa2b84c

Browse files
Temporary excluded MIPS from real-time signal support.
1 parent f047ff3 commit aa2b84c

File tree

1 file changed

+16
-16
lines changed

1 file changed

+16
-16
lines changed

src/sys/signal.rs

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -369,7 +369,7 @@ const SIGNALS: [Signal; 31] = [
369369

370370
// Support for real-time signals
371371
/// Operating system signal value
372-
#[cfg(target_os = "linux")]
372+
#[cfg(all(target_os = "linux", not(target_arch = "mips")))]
373373
#[cfg(any(feature = "aio", feature = "signal"))]
374374
#[derive(Clone, Copy, Debug, PartialEq, Eq, PartialOrd, Ord, Hash)]
375375
pub enum SignalValue {
@@ -381,7 +381,7 @@ pub enum SignalValue {
381381

382382
// Support for real-time signals
383383
/// Operating system signal value
384-
#[cfg(not(target_os = "linux"))]
384+
#[cfg(any(not(target_os = "linux"), all(target_os = "linux", target_arch = "mips")))]
385385
#[cfg(any(feature = "signal", feature = "aio"))]
386386
#[derive(Clone, Copy, Debug, PartialEq, Eq, PartialOrd, Ord, Hash)]
387387
pub enum SignalValue {
@@ -391,7 +391,7 @@ pub enum SignalValue {
391391

392392
#[cfg(any(feature = "aio", feature = "signal"))]
393393
impl SignalValue {
394-
#[cfg(target_os = "linux")]
394+
#[cfg(all(target_os = "linux", not(target_arch = "mips")))]
395395
#[allow(dead_code)]
396396
unsafe fn convert_to_int_unchecked(self) -> libc::c_int {
397397
// Note: dead code is allowed, since this is a private method that can remain unused on some platforms
@@ -401,7 +401,7 @@ impl SignalValue {
401401
}
402402
}
403403

404-
#[cfg(not(target_os = "linux"))]
404+
#[cfg(any(not(target_os = "linux"), all(target_os = "linux", target_arch = "mips")))]
405405
#[allow(dead_code)]
406406
unsafe fn convert_to_int_unchecked(self) -> libc::c_int {
407407
// Note: dead code is allowed, since this is a private method that can remain unused on some platforms
@@ -411,7 +411,7 @@ impl SignalValue {
411411
}
412412

413413
/// Check whether this enum contains a valid signal for this operating system
414-
#[cfg(target_os = "linux")]
414+
#[cfg(all(target_os = "linux", not(target_arch = "mips")))]
415415
pub fn is_valid(&self) -> bool {
416416
match self {
417417
SignalValue::Standard(_) => true,
@@ -422,7 +422,7 @@ impl SignalValue {
422422
}
423423

424424
/// Check whether this enum contains a valid signal for this operating system
425-
#[cfg(not(target_os = "linux"))]
425+
#[cfg(any(not(target_os = "linux"), all(target_os = "linux", target_arch = "mips")))]
426426
pub fn is_valid(&self) -> bool {
427427
match self {
428428
SignalValue::Standard(_) => true,
@@ -432,7 +432,7 @@ impl SignalValue {
432432

433433
#[cfg(feature = "signal")]
434434
impl From<SignalValue> for String {
435-
#[cfg(target_os = "linux")]
435+
#[cfg(all(target_os = "linux", not(target_arch = "mips")))]
436436
fn from(x: SignalValue) -> Self {
437437
match x {
438438
SignalValue::Standard(s) => s.to_string(),
@@ -442,7 +442,7 @@ impl From<SignalValue> for String {
442442
}
443443
}
444444

445-
#[cfg(not(target_os = "linux"))]
445+
#[cfg(any(not(target_os = "linux"), all(target_os = "linux", target_arch = "mips")))]
446446
fn from(x: SignalValue) -> Self {
447447
match x {
448448
SignalValue::Standard(s) => s.to_string(),
@@ -454,7 +454,7 @@ impl From<SignalValue> for String {
454454
impl TryFrom<i32> for SignalValue {
455455
type Error = Errno;
456456

457-
#[cfg(target_os = "linux")]
457+
#[cfg(all(target_os = "linux", not(target_arch = "mips")))]
458458
fn try_from(x: i32) -> Result<Self> {
459459
if x < libc::SIGRTMIN() {
460460
match Signal::try_from(x) {
@@ -466,7 +466,7 @@ impl TryFrom<i32> for SignalValue {
466466
}
467467
}
468468

469-
#[cfg(not(target_os = "linux"))]
469+
#[cfg(any(not(target_os = "linux"), all(target_os = "linux", target_arch = "mips")))]
470470
fn try_from(x: i32) -> Result<Self> {
471471
match Signal::try_from(x) {
472472
Ok(s) => Ok(SignalValue::Standard(s)),
@@ -479,7 +479,7 @@ impl TryFrom<i32> for SignalValue {
479479
impl TryFrom<SignalValue> for i32 {
480480
type Error = Errno;
481481

482-
#[cfg(target_os = "linux")]
482+
#[cfg(all(target_os = "linux", not(target_arch = "mips")))]
483483
fn try_from(x: SignalValue) -> Result<Self> {
484484
match x {
485485
SignalValue::Standard(s) => Ok(s as i32),
@@ -494,7 +494,7 @@ impl TryFrom<SignalValue> for i32 {
494494
}
495495
}
496496

497-
#[cfg(not(target_os = "linux"))]
497+
#[cfg(any(not(target_os = "linux"), all(target_os = "linux", target_arch = "mips")))]
498498
fn try_from(x: SignalValue) -> Result<Self> {
499499
match x {
500500
SignalValue::Standard(s) => Ok(s as i32),
@@ -513,15 +513,15 @@ impl From<Signal> for SignalValue {
513513
impl TryFrom<SignalValue> for Signal {
514514
type Error = Errno;
515515

516-
#[cfg(target_os = "linux")]
516+
#[cfg(all(target_os = "linux", not(target_arch = "mips")))]
517517
fn try_from(x: SignalValue) -> Result<Self> {
518518
match x {
519519
SignalValue::Standard(s) => Ok(s),
520520
SignalValue::Realtime(_) => Err(Errno::EINVAL),
521521
}
522522
}
523523

524-
#[cfg(not(target_os = "linux"))]
524+
#[cfg(any(not(target_os = "linux"), all(target_os = "linux", target_arch = "mips")))]
525525
fn try_from(x: SignalValue) -> Result<Self> {
526526
match x {
527527
SignalValue::Standard(s) => Ok(s),
@@ -561,7 +561,7 @@ impl Iterator for SignalIterator {
561561
impl Iterator for SignalValueIterator {
562562
type Item = SignalValue;
563563

564-
#[cfg(target_os = "linux")]
564+
#[cfg(all(target_os = "linux", not(target_arch = "mips")))]
565565
fn next(&mut self) -> Option<SignalValue> {
566566
let next_signal = match SignalValue::try_from(self.next) {
567567
Ok(s) => {
@@ -578,7 +578,7 @@ impl Iterator for SignalValueIterator {
578578
if next_signal.is_valid() { Some(next_signal) } else { None }
579579
}
580580

581-
#[cfg(not(target_os = "linux"))]
581+
#[cfg(any(not(target_os = "linux"), all(target_os = "linux", target_arch = "mips")))]
582582
fn next(&mut self) -> Option<SignalValue> {
583583
let next_signal = match SignalValue::try_from(self.next) {
584584
Ok(s) => {

0 commit comments

Comments
 (0)