1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 13:57:35 +00:00

Kernel+Userland: Replace the beep syscall with the new /dev/beep device

There's no need to have separate syscall for this kind of functionality,
as we can just have a device node in /dev, called "beep", that allows
writing tone generation packets to emulate the same behavior.

In addition to that, we remove LibC sysbeep function, as this function
was never being used by any C program nor it was standardized in any
way.
Instead, we move the userspace implementation to LibCore.
This commit is contained in:
Liav A 2023-08-25 19:48:46 +03:00 committed by Tim Schumacher
parent ac70abcb73
commit 1b00618fd9
16 changed files with 128 additions and 58 deletions

View file

@ -145,7 +145,6 @@ private:
int virt$accept4(FlatPtr);
u32 virt$allocate_tls(FlatPtr, size_t);
int virt$anon_create(size_t, int);
int virt$beep();
int virt$bind(int sockfd, FlatPtr address, socklen_t address_length);
u32 virt$bindmount(u32 params_addr);
int virt$chdir(FlatPtr, size_t);

View file

@ -47,8 +47,6 @@ u32 Emulator::virt_syscall(u32 function, u32 arg1, u32 arg2, u32 arg3)
return virt$anon_create(arg1, arg2);
case SC_annotate_mapping:
return virt$annotate_mapping(arg1);
case SC_beep:
return virt$beep();
case SC_bind:
return virt$bind(arg1, arg2, arg3);
case SC_bindmount:
@ -1606,11 +1604,6 @@ u32 Emulator::virt$allocate_tls(FlatPtr initial_data, size_t size)
return tls_base;
}
int Emulator::virt$beep()
{
return syscall(SC_beep);
}
u32 Emulator::virt$sysconf(u32 name)
{
return syscall(SC_sysconf, name);