diff options
author | Andreas Kling <kling@serenityos.org> | 2021-08-22 01:37:17 +0200 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-08-22 03:34:10 +0200 |
commit | 55adace359bfda606b445b5177ce5138687d4626 (patch) | |
tree | 429f7e24f71cde34f8f54f10b8ae43b74c514488 /Kernel/Syscalls | |
parent | 7d5d26b0481221d3ebf420de346cc33b3e003147 (diff) | |
download | serenity-55adace359bfda606b445b5177ce5138687d4626.zip |
Kernel: Rename SpinLock => Spinlock
Diffstat (limited to 'Kernel/Syscalls')
-rw-r--r-- | Kernel/Syscalls/execve.cpp | 2 | ||||
-rw-r--r-- | Kernel/Syscalls/fork.cpp | 4 | ||||
-rw-r--r-- | Kernel/Syscalls/futex.cpp | 10 | ||||
-rw-r--r-- | Kernel/Syscalls/profiling.cpp | 8 | ||||
-rw-r--r-- | Kernel/Syscalls/ptrace.cpp | 4 | ||||
-rw-r--r-- | Kernel/Syscalls/sched.cpp | 4 | ||||
-rw-r--r-- | Kernel/Syscalls/thread.cpp | 4 |
7 files changed, 18 insertions, 18 deletions
diff --git a/Kernel/Syscalls/execve.cpp b/Kernel/Syscalls/execve.cpp index a9ff468620..d5d2f2ff52 100644 --- a/Kernel/Syscalls/execve.cpp +++ b/Kernel/Syscalls/execve.cpp @@ -682,7 +682,7 @@ KResult Process::do_exec(NonnullRefPtr<FileDescription> main_program_description } { - ScopedSpinLock lock(g_scheduler_lock); + ScopedSpinlock lock(g_scheduler_lock); new_main_thread->set_state(Thread::State::Runnable); } u32 lock_count_to_restore; diff --git a/Kernel/Syscalls/fork.cpp b/Kernel/Syscalls/fork.cpp index a0ff8cd74a..2ae0d17eae 100644 --- a/Kernel/Syscalls/fork.cpp +++ b/Kernel/Syscalls/fork.cpp @@ -93,7 +93,7 @@ KResultOr<FlatPtr> Process::sys$fork(RegisterState& regs) #endif { - ScopedSpinLock lock(address_space().get_lock()); + ScopedSpinlock lock(address_space().get_lock()); for (auto& region : address_space().regions()) { dbgln_if(FORK_DEBUG, "fork: cloning Region({}) '{}' @ {}", region, region->name(), region->vaddr()); auto maybe_region_clone = region->try_clone(); @@ -120,7 +120,7 @@ KResultOr<FlatPtr> Process::sys$fork(RegisterState& regs) PerformanceManager::add_process_created_event(*child); - ScopedSpinLock lock(g_scheduler_lock); + ScopedSpinlock lock(g_scheduler_lock); child_first_thread->set_affinity(Thread::current()->affinity()); child_first_thread->set_state(Thread::State::Runnable); diff --git a/Kernel/Syscalls/futex.cpp b/Kernel/Syscalls/futex.cpp index 3b5395c049..b945ed302a 100644 --- a/Kernel/Syscalls/futex.cpp +++ b/Kernel/Syscalls/futex.cpp @@ -13,7 +13,7 @@ namespace Kernel { void Process::clear_futex_queues_on_exec() { - ScopedSpinLock lock(m_futex_lock); + ScopedSpinlock lock(m_futex_lock); for (auto& it : m_futex_queues) { bool did_wake_all; it.value->wake_all(did_wake_all); @@ -88,7 +88,7 @@ KResultOr<FlatPtr> Process::sys$futex(Userspace<const Syscall::SC_futex_params*> auto do_wake = [&](FlatPtr user_address, u32 count, Optional<u32> bitmask) -> int { if (count == 0) return 0; - ScopedSpinLock locker(m_futex_lock); + ScopedSpinlock locker(m_futex_lock); auto futex_queue = find_futex_queue(user_address, false); if (!futex_queue) return 0; @@ -117,7 +117,7 @@ KResultOr<FlatPtr> Process::sys$futex(Userspace<const Syscall::SC_futex_params*> } atomic_thread_fence(AK::MemoryOrder::memory_order_acquire); - ScopedSpinLock locker(m_futex_lock); + ScopedSpinlock locker(m_futex_lock); did_create = false; futex_queue = find_futex_queue(user_address, true, &did_create); VERIFY(futex_queue); @@ -130,7 +130,7 @@ KResultOr<FlatPtr> Process::sys$futex(Userspace<const Syscall::SC_futex_params*> Thread::BlockResult block_result = futex_queue->wait_on(timeout, bitset); - ScopedSpinLock locker(m_futex_lock); + ScopedSpinlock locker(m_futex_lock); if (futex_queue->is_empty_and_no_imminent_waits()) { // If there are no more waiters, we want to get rid of the futex! remove_futex_queue(user_address); @@ -150,7 +150,7 @@ KResultOr<FlatPtr> Process::sys$futex(Userspace<const Syscall::SC_futex_params*> atomic_thread_fence(AK::MemoryOrder::memory_order_acquire); int woken_or_requeued = 0; - ScopedSpinLock locker(m_futex_lock); + ScopedSpinlock locker(m_futex_lock); if (auto futex_queue = find_futex_queue(user_address, false)) { RefPtr<FutexQueue> target_futex_queue; bool is_empty, is_target_empty; diff --git a/Kernel/Syscalls/profiling.cpp b/Kernel/Syscalls/profiling.cpp index 7f64e57753..a2b932e85e 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); + ScopedSpinlock 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); + ScopedSpinlock 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); + ScopedSpinlock 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); + ScopedSpinlock lock(g_profiling_lock); if (process->is_profiling()) return EINVAL; process->delete_perf_events_buffer(); diff --git a/Kernel/Syscalls/ptrace.cpp b/Kernel/Syscalls/ptrace.cpp index f9e9ffed48..2e951502f0 100644 --- a/Kernel/Syscalls/ptrace.cpp +++ b/Kernel/Syscalls/ptrace.cpp @@ -18,7 +18,7 @@ namespace Kernel { static KResultOr<u32> handle_ptrace(const Kernel::Syscall::SC_ptrace_params& params, Process& caller) { - ScopedSpinLock scheduler_lock(g_scheduler_lock); + ScopedSpinlock scheduler_lock(g_scheduler_lock); if (params.request == PT_TRACE_ME) { if (Process::current().tracer()) return EBUSY; @@ -55,7 +55,7 @@ static KResultOr<u32> handle_ptrace(const Kernel::Syscall::SC_ptrace_params& par auto result = peer_process.start_tracing_from(caller.pid()); if (result.is_error()) return result.error(); - ScopedSpinLock lock(peer->get_lock()); + ScopedSpinlock lock(peer->get_lock()); if (peer->state() != Thread::State::Stopped) { peer->send_signal(SIGSTOP, &caller); } diff --git a/Kernel/Syscalls/sched.cpp b/Kernel/Syscalls/sched.cpp index 63c16408f6..cffd1e2c55 100644 --- a/Kernel/Syscalls/sched.cpp +++ b/Kernel/Syscalls/sched.cpp @@ -28,7 +28,7 @@ KResultOr<FlatPtr> Process::sys$sched_setparam(int pid, Userspace<const struct s return EINVAL; auto* peer = Thread::current(); - ScopedSpinLock lock(g_scheduler_lock); + ScopedSpinlock lock(g_scheduler_lock); if (pid != 0) peer = Thread::from_tid(pid); @@ -49,7 +49,7 @@ KResultOr<FlatPtr> Process::sys$sched_getparam(pid_t pid, Userspace<struct sched int priority; { auto* peer = Thread::current(); - ScopedSpinLock lock(g_scheduler_lock); + ScopedSpinlock lock(g_scheduler_lock); if (pid != 0) { // FIXME: PID/TID BUG // The entire process is supposed to be affected. diff --git a/Kernel/Syscalls/thread.cpp b/Kernel/Syscalls/thread.cpp index 7a8fcbe3ec..f64e92272d 100644 --- a/Kernel/Syscalls/thread.cpp +++ b/Kernel/Syscalls/thread.cpp @@ -77,7 +77,7 @@ KResultOr<FlatPtr> Process::sys$create_thread(void* (*entry)(void*), Userspace<c PerformanceManager::add_thread_created_event(*thread); - ScopedSpinLock lock(g_scheduler_lock); + ScopedSpinlock lock(g_scheduler_lock); thread->set_priority(requested_thread_priority); thread->set_state(Thread::State::Runnable); return thread->tid().value(); @@ -207,7 +207,7 @@ KResultOr<FlatPtr> Process::sys$get_thread_name(pid_t tid, Userspace<char*> buff if (!thread || thread->pid() != pid()) return ESRCH; - ScopedSpinLock locker(thread->get_lock()); + ScopedSpinlock locker(thread->get_lock()); auto thread_name = thread->name(); if (thread_name.is_null()) { |