mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-26 06:18:59 +00:00
Kernel: Disable interrupts for aarch64 in WorkQueue's main loop
This code expects to be executed with interrupts disabled, however we currently spawn (kernel) threads with interrupts enabled on aarch64.
This commit is contained in:
parent
05b9eb7feb
commit
aa40cef2b7
Notes:
sideshowbarker
2024-07-17 02:37:08 +09:00
Author: https://github.com/FireFox317
Commit: aa40cef2b7
Pull-request: https://github.com/SerenityOS/serenity/pull/18131
Reviewed-by: https://github.com/ADKaster ✅
Reviewed-by: https://github.com/kleinesfilmroellchen ✅
Reviewed-by: https://github.com/nico ✅
1 changed files with 8 additions and 0 deletions
|
@ -5,6 +5,7 @@
|
||||||
* SPDX-License-Identifier: BSD-2-Clause
|
* SPDX-License-Identifier: BSD-2-Clause
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include <Kernel/Arch/Processor.h>
|
||||||
#include <Kernel/Process.h>
|
#include <Kernel/Process.h>
|
||||||
#include <Kernel/Sections.h>
|
#include <Kernel/Sections.h>
|
||||||
#include <Kernel/WaitQueue.h>
|
#include <Kernel/WaitQueue.h>
|
||||||
|
@ -28,6 +29,13 @@ UNMAP_AFTER_INIT WorkQueue::WorkQueue(StringView name)
|
||||||
if (name_kstring.is_error())
|
if (name_kstring.is_error())
|
||||||
TODO();
|
TODO();
|
||||||
(void)Process::create_kernel_process(thread, name_kstring.release_value(), [this] {
|
(void)Process::create_kernel_process(thread, name_kstring.release_value(), [this] {
|
||||||
|
#if ARCH(AARCH64)
|
||||||
|
// FIXME: This function expects to be executed with interrupts disabled, however on
|
||||||
|
// aarch64 we spawn (kernel) threads with interrupts enabled, so we need to disable them.
|
||||||
|
// This code should be written in a way that it is able to be executed with interrupts enabled.
|
||||||
|
Processor::disable_interrupts();
|
||||||
|
#endif
|
||||||
|
|
||||||
for (;;) {
|
for (;;) {
|
||||||
WorkItem* item;
|
WorkItem* item;
|
||||||
bool have_more;
|
bool have_more;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue