mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-06 16:45:03 +00:00
Kernel: Move IO delay code to x86 architecture subdirectory
Many code patterns and hardware procedures rely on reliable delay in the microseconds granularity, and since they are using such delays which are valid cases, but should not rely on x86 specific code, we allow to determine in compile time the proper platform-specific code to use to invoke such delays.
This commit is contained in:
@@ -7,6 +7,7 @@
|
||||
*/
|
||||
|
||||
#include <AK/StdLibExtras.h>
|
||||
#include <Kernel/Arch/Delay.h>
|
||||
#include <Kernel/CommandLine.h>
|
||||
#include <Kernel/Debug.h>
|
||||
#include <Kernel/Devices/DeviceManagement.h>
|
||||
@@ -327,7 +328,7 @@ void VirtualConsole::beep()
|
||||
if (!kernel_command_line().is_pc_speaker_enabled())
|
||||
return;
|
||||
PCSpeaker::tone_on(440);
|
||||
IO::delay(10000);
|
||||
microseconds_delay(10000);
|
||||
PCSpeaker::tone_off();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user