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

Kernel: Protect access to PerformanceEventBuffer strings with spinlock

This commit is contained in:
Jakub Berkop 2023-08-25 23:45:29 +02:00 committed by Andrew Kaster
parent a0bcc9dd83
commit c184a0786f
2 changed files with 26 additions and 17 deletions

View file

@ -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;