IgrOS-Kernel 0.1.34.545
Simple C++20 Kernel for i386/x86_64
Loading...
Searching...
No Matches
igros::arch::irq Class Referencefinal

IRQ structure. More...

#include <arch/x86/irq.hpp>

Classes

class  guard
 Disable interrupts in scope (restores previous state on exit). More...

Public Member Functions

 irq () noexcept=default
 Default c-tor.
 irq (const irq &other)=delete
 Copy c-tor.
 irq (irq &&other)=delete
 Move c-tor.
 ~irq () noexcept=default
 D-tor.
auto operator= (const irq &other) -> irq &=delete
 Copy assignment.
auto operator= (irq &&other) -> irq &=delete
 Move assignment.

Static Public Member Functions

static void init () noexcept
 Init IRQ.
static void enable () noexcept
 Enable interrupts.
static void disable () noexcept
 Disable interrupts.
static void mask (const irq_t number) noexcept
 Mask interrupt.
static void unmask (const irq_t number) noexcept
 Unmask interrupt.
static void setMask (const igros_word_t mask=0xFFFF_u16) noexcept
 Set interrupts mask.
static auto getMask () noexcept -> igros_word_t
 Get interrupts mask.
template<irq_t N, isr_t HANDLE>
static void install () noexcept
 Install IRQ handler.
template<irq_t N>
static void uninstall () noexcept
 Uninstall IRQ handler.
static void eoi (const irq_t number) noexcept
 Send EOI (IRQ done).
static auto isSpurious (const irq_t number) noexcept -> bool
 Check if IRQ is spurious (only lines 7 and 15 can be).

Detailed Description

IRQ structure.

IRQ type.

Definition at line 111 of file irq.hpp.

Member Function Documentation

◆ disable()

void igros::x86::irq::disable ( )
staticnoexcept

Disable interrupts.

Definition at line 70 of file irq.cpp.

◆ enable()

void igros::x86::irq::enable ( )
staticnoexcept

Enable interrupts.

Definition at line 65 of file irq.cpp.

◆ eoi()

void igros::x86::irq::eoi ( const irq_t number)
staticnoexcept

Send EOI (IRQ done).

Parameters
numberHandled IRQ line

Definition at line 117 of file irq.cpp.

◆ getMask()

auto igros::x86::irq::getMask ( ) ->igros_word_t
staticnodiscardnoexcept

Get interrupts mask.

Returns
Mask of both PICs (bit set - line masked)

Definition at line 106 of file irq.cpp.

◆ init()

void igros::x86::irq::init ( )
staticnoexcept

Init IRQ.

Definition at line 46 of file irq.cpp.

◆ install()

template<irq_t N, isr_t HANDLE>
void igros::x86::irq::install ( )
inlinestaticnoexcept

Install IRQ handler.

Install handler.

Definition at line 199 of file irq.hpp.

◆ isSpurious()

auto igros::x86::irq::isSpurious ( const irq_t number) ->bool
staticnodiscardnoexcept

Check if IRQ is spurious (only lines 7 and 15 can be).

Parameters
numberIRQ line
Returns
true if PIC raised the line without a request

Definition at line 130 of file irq.cpp.

◆ mask()

void igros::x86::irq::mask ( const irq_t number)
staticnoexcept

Mask interrupt.

Parameters
numberIRQ line (lines past 15 are ignored)

Definition at line 76 of file irq.cpp.

◆ setMask()

void igros::x86::irq::setMask ( const igros_word_t mask = 0xFFFF_u16)
staticnoexcept

Set interrupts mask.

Parameters
maskMask of both PICs (bit set - line masked)

Definition at line 95 of file irq.cpp.

◆ uninstall()

template<irq_t N>
void igros::x86::irq::uninstall ( )
inlinestaticnoexcept

Uninstall IRQ handler.

Uninstall handler.

Definition at line 206 of file irq.hpp.

◆ unmask()

void igros::x86::irq::unmask ( const irq_t number)
staticnoexcept

Unmask interrupt.

Parameters
numberIRQ line (lines past 15 are ignored)

Definition at line 85 of file irq.cpp.


The documentation for this class was generated from the following files: