mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-21 18:00:16 +00:00
Kernel: Protect access to PerformanceEventBuffer strings with spinlock
This commit is contained in:
parent
a0bcc9dd83
commit
c184a0786f
Notes:
sideshowbarker
2024-07-17 08:13:43 +09:00
Author: https://github.com/jakubberkop
Commit: c184a0786f
Pull-request: https://github.com/SerenityOS/serenity/pull/19950
Reviewed-by: https://github.com/AtkinsSJ
2 changed files with 26 additions and 17 deletions
|
@ -1,5 +1,6 @@
|
|||
/*
|
||||
* Copyright (c) 2020, Andreas Kling <kling@serenityos.org>
|
||||
* Copyright (c) 2023, Jakub Berkop <jakub.berkop@gmail.com>
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
@ -145,7 +146,7 @@ private:
|
|||
size_t m_count { 0 };
|
||||
NonnullOwnPtr<KBuffer> m_buffer;
|
||||
|
||||
HashMap<NonnullOwnPtr<KString>, size_t> m_strings;
|
||||
SpinlockProtected<HashMap<NonnullOwnPtr<KString>, size_t>, LockRank::None> m_strings;
|
||||
};
|
||||
|
||||
extern bool g_profiling_all_threads;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue