Coder Social home page Coder Social logo

mkroening / interrupts Goto Github PK

View Code? Open in Web Editor NEW
6.0 1.0 0.0 46 KB

Cross-architecture utilities for temporarily disabling interrupts and signals.

Home Page: https://crates.io/crates/interrupts

License: Apache License 2.0

Rust 100.00%
interrupts osdev rust

interrupts's Introduction

interrupts

Crates.io docs.rs CI

Cross-architecture utilities for temporarily disabling interrupts and signals.

Use disable to disable interrupts with a guard:

// interrupts may or may not be enabled
let guard = interrupts::disable();
// interrupts are disabled
drop(guard);
// interrupts are restored to the previous state

Use without to run a closure with disabled interrupts:

// interrupts may or may not be enabled
interrupts::without(|| {
    // interrupts are disabled
});
// interrupts are restored to the previous state

For API documentation, see the docs.

Related Crates

  • interrupt-ref-cell (A RefCell for sharing data with interrupt handlers or signal handlers on the same thread.)
  • interrupt-mutex (A mutex for sharing data with interrupt handlers or signal handlers.)

License

Licensed under either of

at your option.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

interrupts's People

Contributors

mkroening avatar dependabot[bot] avatar

Stargazers

Stephen Kichka avatar  avatar Gijs Burghoorn avatar Alexander González avatar Gelven avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.