Kernel: Use generic functions to change interrupt state of Processor

This allows these files to be built for aarch64.
This commit is contained in:
Timon Kruiper 2022-10-25 18:42:57 +02:00 committed by Gunnar Beutner
parent acfeffc9ca
commit f9ab02429b
Notes: sideshowbarker 2024-07-17 07:11:12 +09:00
2 changed files with 27 additions and 26 deletions

View file

@ -408,12 +408,12 @@ void E1000NetworkAdapter::send_raw(ReadonlyBytes payload)
descriptor.cmd = CMD_EOP | CMD_IFCS | CMD_RS;
dbgln_if(E1000_DEBUG, "E1000: Using tx descriptor {} (head is at {})", tx_current, in32(REG_TXDESCHEAD));
tx_current = (tx_current + 1) % number_of_tx_descriptors;
cli();
Processor::disable_interrupts();
enable_irq();
out32(REG_TXDESCTAIL, tx_current);
for (;;) {
if (descriptor.status) {
sti();
Processor::enable_interrupts();
break;
}
m_wait_queue.wait_forever("E1000NetworkAdapter"sv);