mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-22 23:50:19 +00:00
Kernel: Switch m_signal_action_data to Array<...>
This commit is contained in:
parent
a977cdd9ac
commit
dae071629f
Notes:
sideshowbarker
2024-07-18 22:03:28 +09:00
Author: https://github.com/bgianfo Commit: https://github.com/SerenityOS/serenity/commit/dae071629ff Pull-request: https://github.com/SerenityOS/serenity/pull/5448 Reviewed-by: https://github.com/awesomekling
2 changed files with 5 additions and 5 deletions
|
@ -547,9 +547,7 @@ void Thread::clear_signals()
|
||||||
m_signal_mask = 0;
|
m_signal_mask = 0;
|
||||||
m_pending_signals = 0;
|
m_pending_signals = 0;
|
||||||
m_have_any_unmasked_pending_signals.store(false, AK::memory_order_release);
|
m_have_any_unmasked_pending_signals.store(false, AK::memory_order_release);
|
||||||
|
m_signal_action_data.fill({});
|
||||||
Span<SignalActionData> action_data(m_signal_action_data);
|
|
||||||
action_data.fill({});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Certain exceptions, such as SIGSEGV and SIGILL, put a
|
// Certain exceptions, such as SIGSEGV and SIGILL, put a
|
||||||
|
@ -868,7 +866,8 @@ RefPtr<Thread> Thread::clone(Process& process)
|
||||||
if (thread_or_error.is_error())
|
if (thread_or_error.is_error())
|
||||||
return {};
|
return {};
|
||||||
auto& clone = thread_or_error.value();
|
auto& clone = thread_or_error.value();
|
||||||
memcpy(clone->m_signal_action_data, m_signal_action_data, sizeof(m_signal_action_data));
|
auto signal_action_data_span = m_signal_action_data.span();
|
||||||
|
signal_action_data_span.copy_to(clone->m_signal_action_data.span());
|
||||||
clone->m_signal_mask = m_signal_mask;
|
clone->m_signal_mask = m_signal_mask;
|
||||||
memcpy(clone->m_fpu_state, m_fpu_state, sizeof(FPUState));
|
memcpy(clone->m_fpu_state, m_fpu_state, sizeof(FPUState));
|
||||||
clone->m_thread_specific_data = m_thread_specific_data;
|
clone->m_thread_specific_data = m_thread_specific_data;
|
||||||
|
|
|
@ -47,6 +47,7 @@
|
||||||
#include <Kernel/TimerQueue.h>
|
#include <Kernel/TimerQueue.h>
|
||||||
#include <Kernel/UnixTypes.h>
|
#include <Kernel/UnixTypes.h>
|
||||||
#include <LibC/fd_set.h>
|
#include <LibC/fd_set.h>
|
||||||
|
#include <LibC/signal_numbers.h>
|
||||||
|
|
||||||
namespace Kernel {
|
namespace Kernel {
|
||||||
|
|
||||||
|
@ -1239,7 +1240,7 @@ private:
|
||||||
u32 m_kernel_stack_top { 0 };
|
u32 m_kernel_stack_top { 0 };
|
||||||
OwnPtr<Region> m_kernel_stack_region;
|
OwnPtr<Region> m_kernel_stack_region;
|
||||||
VirtualAddress m_thread_specific_data;
|
VirtualAddress m_thread_specific_data;
|
||||||
SignalActionData m_signal_action_data[32] { };
|
Array<SignalActionData, NSIG> m_signal_action_data;
|
||||||
Blocker* m_blocker { nullptr };
|
Blocker* m_blocker { nullptr };
|
||||||
|
|
||||||
#if LOCK_DEBUG
|
#if LOCK_DEBUG
|
||||||
|
|
Loading…
Reference in a new issue