summaryrefslogtreecommitdiff
path: root/Kernel/Syscalls/profiling.cpp
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2021-08-22 01:49:22 +0200
committerAndreas Kling <kling@serenityos.org>2021-08-22 03:34:10 +0200
commitc922a7da090d57ed36cf8526e985b82ec3f4933f (patch)
treed4791565a1149af47eae4cb4470f875e0644f18c /Kernel/Syscalls/profiling.cpp
parent55adace359bfda606b445b5177ce5138687d4626 (diff)
downloadserenity-c922a7da090d57ed36cf8526e985b82ec3f4933f.zip
Kernel: Rename ScopedSpinlock => SpinlockLocker
This matches MutexLocker, and doesn't sound like it's a lock itself.
Diffstat (limited to 'Kernel/Syscalls/profiling.cpp')
-rw-r--r--Kernel/Syscalls/profiling.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/Kernel/Syscalls/profiling.cpp b/Kernel/Syscalls/profiling.cpp
index a2b932e85e..3580ba8910 100644
--- a/Kernel/Syscalls/profiling.cpp
+++ b/Kernel/Syscalls/profiling.cpp
@@ -31,7 +31,7 @@ KResultOr<FlatPtr> Process::sys$profiling_enable(pid_t pid, u64 event_mask)
else
g_global_perf_events = PerformanceEventBuffer::try_create_with_size(32 * MiB).leak_ptr();
- ScopedSpinlock lock(g_profiling_lock);
+ SpinlockLocker lock(g_profiling_lock);
if (!TimeManagement::the().enable_profile_timer())
return ENOTSUP;
g_profiling_all_threads = true;
@@ -51,7 +51,7 @@ KResultOr<FlatPtr> Process::sys$profiling_enable(pid_t pid, u64 event_mask)
return ESRCH;
if (!is_superuser() && process->uid() != euid())
return EPERM;
- ScopedSpinlock lock(g_profiling_lock);
+ SpinlockLocker lock(g_profiling_lock);
g_profiling_event_mask = PERF_EVENT_PROCESS_CREATE | PERF_EVENT_THREAD_CREATE | PERF_EVENT_MMAP;
process->set_profiling(true);
if (!process->create_perf_events_buffer_if_needed()) {
@@ -86,7 +86,7 @@ KResultOr<FlatPtr> Process::sys$profiling_disable(pid_t pid)
return ESRCH;
if (!is_superuser() && process->uid() != euid())
return EPERM;
- ScopedSpinlock lock(g_profiling_lock);
+ SpinlockLocker lock(g_profiling_lock);
if (!process->is_profiling())
return EINVAL;
// FIXME: If we enabled the profile timer and it's not supported, how do we disable it now?
@@ -122,7 +122,7 @@ KResultOr<FlatPtr> Process::sys$profiling_free_buffer(pid_t pid)
return ESRCH;
if (!is_superuser() && process->uid() != euid())
return EPERM;
- ScopedSpinlock lock(g_profiling_lock);
+ SpinlockLocker lock(g_profiling_lock);
if (process->is_profiling())
return EINVAL;
process->delete_perf_events_buffer();