Quellcodebibliothek Statistik Leitseite products/Sources/formale Sprachen/C/Firefox/third_party/rust/rustix/src/ioctl/   (Firefox Browser Version 153.0.1©)  Datei vom 27.6.2026 mit Größe 746 B image not shown  

Quelle  bsd.rs

  Sprache: Rust
 

//! `ioctl` opcode behavior for BSD platforms.

use super::{Direction, Opcode};

pub(superconst fn compose_opcode(
    dir: Direction,
    group: Opcode,
    num: Opcode,
    size: Opcode,
) -> Opcode {
    let dir = match dir {
        Direction::None => NONE,
        Direction::Read => READ,
        Direction::Write => WRITE,
        Direction::ReadWrite => READ | WRITE,
    };

    dir | num | (group << 8) | ((size & IOCPARAM_MASK) << 16)
}

// `IOC_VOID`
pub const NONE: Opcode = 0x2000_0000;
// `IOC_OUT` (“out” is from the perspective of the kernel)
pub const READ: Opcode = 0x4000_0000;
// `IOC_IN` (“in” is from the perspective of the kernel)
pub const WRITE: Opcode = 0x8000_0000;
pub const IOCPARAM_MASK: Opcode = 0x1FFF;

Messung V0.5 in Prozent
C=89 H=100 G=94

¤ Dauer der Verarbeitung: 0.2 Sekunden  ¤

*© Formatika GbR, Deutschland






Wurzel

Suchen

PVS Prover

Isabelle Prover

NIST Cobol Testsuite

Cephes Mathematical Library

Vienna Development Method

Haftungshinweis

Die Informationen auf dieser Webseite wurden nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit, noch Qualität der bereit gestellten Informationen zugesichert.

Bemerkung:

Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.