Commit Graph

30397 Commits

Author SHA1 Message Date
Andreas Kling
d117c4cccc truncate: Add a basic set of pledge promises 2021-11-23 12:31:21 +01:00
Andreas Kling
9eb7030b55 truncate: Port to LibMain and use LibCore syscall wrappers :^) 2021-11-23 12:27:33 +01:00
Andreas Kling
3db9979e40 LibCore: Add syscall wrapper for stat() 2021-11-23 12:23:54 +01:00
Andreas Kling
4a213869f2 LibCore: Add syscall wrapper for ftruncate() 2021-11-23 12:23:54 +01:00
Andreas Kling
4bf08e4d52 LibCore: Add syscall wrapper for close() 2021-11-23 12:23:54 +01:00
Andreas Kling
adb9b86807 LibGfx: Use Core::System::open() in Gfx::Bitmap :^) 2021-11-23 12:23:54 +01:00
Andreas Kling
0ed5f84bd9 LibCore: Use open() wrapper in Core::MappedFile :^) 2021-11-23 12:23:54 +01:00
Andreas Kling
50416c286d LibCore: Add syscall wrapper for open() 2021-11-23 11:59:50 +01:00
Andreas Kling
094fa900a3 LibCore: Use mmap() and munmap() wrappers in Core::MappedFile 2021-11-23 11:51:46 +01:00
Andreas Kling
45842a5208 LibCore: Add syscall wrapper for munmap() 2021-11-23 11:51:11 +01:00
Andreas Kling
53e9b9758e LibCore: Add syscall wrapper for mmap()
For convenience on SerenityOS, this also takes a custom alignment
request, and a memory region name. These are non-POSIX extensions.
2021-11-23 11:48:40 +01:00
Andreas Kling
dd6e73176d Kernel: Make sys$mmap() interpret 0-alignment as page-sized alignment
This allows userspace to get a sane default behavior without having to
specify the page size.
2021-11-23 11:44:42 +01:00
Andreas Kling
a62d16fbe9 LibCore: Use syscall wrappers in MappedFile::map_from_fd_and_close() 2021-11-23 11:36:00 +01:00
Andreas Kling
58fb3ebf66 LibCore+AK: Move MappedFile from AK to LibCore
MappedFile is strictly a userspace thing, so it doesn't belong in AK
(which is supposed to be user/kernel agnostic.)
2021-11-23 11:33:36 +01:00
Andreas Kling
c1c9da6c35 LoginServer: Port to LibMain :^) 2021-11-23 11:33:36 +01:00
Andreas Kling
c1a3968c66 LibCore: Make LocalSocket takeover mechanism return ErrorOr<T> 2021-11-23 11:33:36 +01:00
Andreas Kling
c37a02341b LibCore: Add Core::System wrappers for fstat() and fcntl() 2021-11-23 11:33:36 +01:00
Andreas Kling
21a5fb0fa2 LibCore+LibSystem: Move syscall wrappers from LibSystem to LibCore
With this change, System::foo() becomes Core::System::foo().

Since LibCore builds on other systems than SerenityOS, we now have to
make sure that wrappers work with just a standard C library underneath.
2021-11-23 11:33:36 +01:00
Andreas Kling
acc2eccede LibSystem: Add wrapper for fstat() 2021-11-23 11:33:36 +01:00
Andreas Kling
2828d58a10 RequestServer: Port to LibMain :^) 2021-11-23 11:33:36 +01:00
Andreas Kling
5e93db93fc ImageDecoder: Port to LibMain :^) 2021-11-23 11:33:36 +01:00
Andreas Kling
c6a581f267 WebSocket: Port to LibMain :^) 2021-11-23 11:33:36 +01:00
Andreas Kling
c2b90bab9f LanguageServers/Shell: Port to LibMain :^) 2021-11-23 11:33:36 +01:00
Andreas Kling
54155f8c64 LanguageServers/Cpp: Port to LibMain :^) 2021-11-23 11:33:36 +01:00
Andreas Kling
9d4c946515 FileSystemAccessServer: Port to LibMain :^) 2021-11-23 11:33:36 +01:00
Andreas Kling
32e05f9b14 WebContent: Port to LibMain :^) 2021-11-23 11:33:36 +01:00
Jelle Raaijmakers
69a7ffa174 Meta: Increase PulseAudio timer period to 2ms
This seems to prevent crackling audio when starting up Qemu whenever
there is audio already playing.
2021-11-23 10:35:00 +01:00
Jelle Raaijmakers
9d8a566d83 Meta: Use 1ms timer period for Qemu Pulse Audio backend
The default seems to be 10ms and can result in a lot of crackling
noises in the output. A value of 1ms works well on my machine.
2021-11-23 10:06:24 +01:00
Jelle Raaijmakers
03329bbfa5 Meta: Use AC97 device in Qemu by default 2021-11-23 10:06:24 +01:00
Jelle Raaijmakers
7a2a0c1052 Kernel: Implement AC97 audio device driver 2021-11-23 10:06:24 +01:00
Jelle Raaijmakers
1aafb6cd23 Kernel: Teach DeviceManagement to handle multiple audio devices 2021-11-23 10:06:24 +01:00
Jelle Raaijmakers
61d77274db Kernel: Move SB16 to Audio subdirectory 2021-11-23 10:06:24 +01:00
Mustafa Quraish
4d302e0e88 Everywhere: Use Application::construct() with Main::Arguments directly
Use the updated API everywhere we are currently manually passing in
`arguments.argc` and `arguments.argv`.
2021-11-22 21:13:42 -08:00
Mustafa Quraish
2fbcab46bf Everywhere: Use ArgsParser::parse() with Main::Arguments directly
Use the updated API everywhere we are currently manually passing in
`arguments.argc` and `arguments.argv`.
2021-11-22 21:13:42 -08:00
Mustafa Quraish
7720644ae2 LibCore: Let ArgsParser::parse() accept Main::Arguments
Instead of manually passing in `arguments.argc` and `arguments.argv`,
we can now just pass in the arguments directly.
2021-11-22 21:13:42 -08:00
Mustafa Quraish
a0ef655451 LibGUI: Let Application constructor accept in Main::Arguments
Instead of manually passing in `arguments.argc` and `arguments.argv`,
we can now just pass in the arguments directly.
2021-11-22 21:13:42 -08:00
Ali Mohammad Pur
3ca00c8ae6 LibGfx: Avoid unaligned loads and stores in GlyphBitmap 2021-11-22 21:10:25 -08:00
pbrw
71298ad9ba Spider: Port to LibMain
Simplified two pledge() and two unveil() by using TRY()
2021-11-22 21:03:45 -08:00
Pedro Pereira
85ae298b85 FlappyBug: Port to LibMain
Simplified two pledge() and two unveil() by using TRY().
2021-11-22 21:02:14 -08:00
Pascal Puffke
ca7b603578 Mail: Port to LibMain 2021-11-22 23:56:22 +01:00
Pascal Puffke
41b80f3d85 Piano: Port to LibMain 2021-11-22 23:56:22 +01:00
Pascal Puffke
61408e2397 PDFViewer: Port to LibMain 2021-11-22 23:56:22 +01:00
Pascal Puffke
bec7ffaf0a PixelPaint: Port to LibMain 2021-11-22 23:56:22 +01:00
Pedro Pereira
55db1811c7 Chess: Port to LibMain
Simplified two pledge() and five unveil() by using TRY().
2021-11-22 23:55:42 +01:00
Andreas Kling
b65a039db7 Applets/ResourceGraph: Port to LibMain :^)
This simplifies a bunch of calls to pledge() and unveil().
2021-11-22 23:52:47 +01:00
Andreas Kling
d0db6c472c Applets/ResourceGraph: Remove unnecessary unveiling of /etc/passwd
This used to be needed by Core::ProcessStatisticsReader, but since we no
longer use that for the CPU graph, we can just lose it (along with a
FIXME about it.)
2021-11-22 23:52:47 +01:00
Andreas Kling
c5c54f634e FileManager: Port to LibMain :^)
This simplifies a handful of calls to pledge() and sigaction().
2021-11-22 23:52:47 +01:00
Andreas Kling
9cf874ef9a WindowServer: Port to LibMain :^)
This simplifies some pledge(), unveil() and sigaction() calls.
2021-11-22 23:52:47 +01:00
Sam Atkins
97eb662e62 Browser: Scope bookmark actions so that they don't block the delete key
This fixes #10940.

Previously, all presses of the Delete key without a modifier in Browser
were uselessly consumed by the "Delete" action in the bookmark context
menu.
2021-11-22 23:48:10 +01:00
Pedro Pereira
fb5ea617f1 2048: Port to LibMain
Simplified two pledge() and two unveil() by using TRY().
2021-11-22 23:44:55 +01:00