The Pedigree Project 0.1
LocalApicIcrTransaction.h
1/*
2 * Copyright (c) 2026, Pedigree Developers
3 *
4 * Permission to use, copy, modify, and distribute this software for any
5 * purpose with or without fee is hereby granted.
6 */
7
8#ifndef KERNEL_MACHINE_MACH_PC_LOCALAPICICRTRANSACTION_H
9#define KERNEL_MACHINE_MACH_PC_LOCALAPICICRTRANSACTION_H
10#include <config.h>
11
20 public:
21 explicit constexpr LocalApicIcrTransaction(bool interruptsWereEnabled)
22 : m_InterruptsWereEnabled(interruptsWereEnabled) {}
23
24 constexpr bool masksMaskableInterrupts() const {
25 return true;
26 }
27
28 constexpr bool restoreInterrupts() const {
29 return m_InterruptsWereEnabled;
30 }
31
32 constexpr bool allowsMaskableHardIrqPreemption() const {
33 return false;
34 }
35
36 private:
37 bool m_InterruptsWereEnabled;
38};
39
40#endif